We want to use two surveys because we only want to change the matrix questions into drop down questions etc. in the "Smartphone Survey". That is because the Desktop Version should look exactly like the survey version that we send on paper.
So in case I want to redirect to two different surveys:
I put
{if(mobile=="true","https://surveyXXX")};
{if(mobile=="false","https://surveyYYY")};
in the long script from you.
Because I thought mobile is already defined as a variable. But it doesn't work.
Hi,
the variable is "jscd.mobile" which you might use.
And if you use the full script and get all information in the text question you have to grab the mobile status by an equation with some string functions.
And if you only leave this in this part of the script
Code:
$(document).ready(function(){// Hide this question (remove double slash below to hide)//$('#question{QID}').hide();// Load the question
$('#question{QID} textarea').val(
jscd.mobile;);});
the answer text of the question is only if it's a mobile device or not: true or false
And you can use this result as an switch for other questions / relevance equations.
Because I still do not understand why you insist on two surveys.
If you have questions of type matrix you might use question relevance like
Q1Desk with relevance equation QMobile=="false" (normal array display)
Q1Mob with relevance equation QMobile=="true" (drop-down display).
Q2Desk with relevance equation QMobile=="false" (normal array display)
Q2Mob with relevance equation QMobile=="true" (drop-down display).
...
The only obstacle may be the limitation of columns in MySQL.
But it's up to you.
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless