Survey
260
en
gid
sid
group_name
group_order
description
language
randomization_group
grelevance
qid
parent_qid
sid
gid
type
title
question
preg
help
other
mandatory
question_order
language
scale_id
same_default
relevance
modulename
$(document).ready(function() {
// Identify the questions
var thisQuestion = $('#question{QID}');
var qHidden = thisQuestion.nextAll('.multiple-short-txt:eq(0)');
var hiddenInput1 = $('input.text:eq(0)', qHidden);
var hiddenInput2 = $('input.text:eq(1)', qHidden);
// Hide qHidden
qHidden.hide();
// Class for "Other
$('input.text', thisQuestion).closest('.answer-item').addClass('other-item');
// Listener on the checkboxes
$('input.checkbox', thisQuestion).on('change', function(e) {
handleChecked();
});
// Listener on the "Other" input
$('input.text', thisQuestion).on('keyup change', function(e) {
setTimeout(function() {
handleChecked();
}, 250);
});
function handleChecked() {
// Build an array of checked answers
var checkedAnswers = [];
$('input.checkbox:checked', thisQuestion).each(function(i) {
if($(this).closest('.answer-item').hasClass('other-item')) {
checkedAnswers.push($(this).closest('.answer-item').find('input.text').val());
}
else {
checkedAnswers.push($.trim($(this).nextAll('.label-text:eq(0)').text()));
}
});
// Shuffle the array
shuffleArray(checkedAnswers);
// Load the hidden question with a random item2 from the array
$(hiddenInput1).val(checkedAnswers[0]);
if(checkedAnswers.length > 1) {
$(hiddenInput2).val(checkedAnswers[1]);
}
else {
$(hiddenInput2).val('');
}
// Fire Expression Manager
checkconditions(hiddenInput1.value, hiddenInput1.name, hiddenInput1.type);
checkconditions(hiddenInput2.value, hiddenInput2.name, hiddenInput2.type);
}
});
function shuffleArray(array) {
for (var i = array.length - 1; i > 0; i--) {
var j = Math.floor(Math.random() * (i + 1));
var temp = array[i];
array[i] = array[j];
array[j] = temp;
}
return array;
}
]]>
The second value in the hidden question is: {qHidden_SQ002}]]>
qid
parent_qid
sid
gid
type
title
question
preg
help
other
mandatory
question_order
language
scale_id
same_default
relevance
modulename
sid
admin
expires
startdate
adminemail
anonymized
faxto
format
savetimings
template
language
additional_languages
datestamp
usecookie
allowregister
allowsave
autonumber_start
autoredirect
allowprev
printanswers
ipaddr
refurl
publicstatistics
publicgraphs
listpublic
htmlemail
sendconfirmation
tokenanswerspersistence
assessments
usecaptcha
usetokens
bounce_email
attributedescriptions
emailresponseto
emailnotificationto
tokenlength
showxquestions
showgroupinfo
shownoanswer
showqnumcode
bouncetime
bounceprocessing
bounceaccounttype
bounceaccounthost
bounceaccountpass
bounceaccountencryption
bounceaccountuser
showwelcome
showprogress
questionindex
navigationdelay
nokeyboard
alloweditaftercompletion
googleanalyticsstyle
googleanalyticsapikey
surveyls_survey_id
surveyls_language
surveyls_title
surveyls_description
surveyls_welcometext
surveyls_endtext
surveyls_url
surveyls_urldescription
surveyls_email_invite_subj
surveyls_email_invite
surveyls_email_remind_subj
surveyls_email_remind
surveyls_email_register_subj
surveyls_email_register
surveyls_email_confirm_subj
surveyls_email_confirm
surveyls_dateformat
surveyls_attributecaptions
email_admin_notification_subj
email_admin_notification
email_admin_responses_subj
email_admin_responses
surveyls_numberformat
attachments
you have been invited to participate in a survey.
The survey is titled:
"{SURVEYNAME}"
"{SURVEYDESCRIPTION}"
To participate, please click on the link below.
Sincerely,
{ADMINNAME} ({ADMINEMAIL})
----------------------------------------------
Click here to do the survey:
{SURVEYURL}
If you do not want to participate in this survey and don't want to receive any more invitations please click the following link:
{OPTOUTURL}
If you are blacklisted but want to participate in this survey and want to receive invitations please click the following link:
{OPTINURL}]]>
Recently we invited you to participate in a survey.
We note that you have not yet completed the survey, and wish to remind you that the survey is still available should you wish to take part.
The survey is titled:
"{SURVEYNAME}"
"{SURVEYDESCRIPTION}"
To participate, please click on the link below.
Sincerely,
{ADMINNAME} ({ADMINEMAIL})
----------------------------------------------
Click here to do the survey:
{SURVEYURL}
If you do not want to participate in this survey and don't want to receive any more invitations please click the following link:
{OPTOUTURL}]]>
You, or someone using your email address, have registered to participate in an online survey titled {SURVEYNAME}.
To complete this survey, click on the following URL:
{SURVEYURL}
If you have any questions about this survey, or if you did not register to participate and believe this email is in error, please contact {ADMINNAME} at {ADMINEMAIL}.]]>
this email is to confirm that you have completed the survey titled {SURVEYNAME} and your response has been saved. Thank you for participating.
If you have any further questions about this email, please contact {ADMINNAME} on {ADMINEMAIL}.
Sincerely,
{ADMINNAME}]]>
A new response was submitted for your survey '{SURVEYNAME}'.
File uploaded: {stristr(str_replace('name":"', '', stristr(upload1, 'name":"')), '"', 'true')}
Click the following link to reload the survey:
{RELOADURL}
Click the following link to see the individual response:
{VIEWRESPONSEURL}
Click the following link to edit the individual response:
{EDITRESPONSEURL}
View statistics by clicking here:
{STATISTICSURL}]]>
A new response was submitted for your survey '{SURVEYNAME}'.
Click the following link to reload the survey:
{RELOADURL}
Click the following link to see the individual response:
{VIEWRESPONSEURL}
Click the following link to edit the individual response:
{EDITRESPONSEURL}
View statistics by clicking here:
{STATISTICSURL}
The following answers were given by the participant:
{ANSWERTABLE}]]>