Hello,
Thanks for your answers. We tried to use another theme (Vanilla) and to correct all error message from “check data integrity”, but the issue is still persistent. Thus,
it does not seem to occur due to the theme or data integrity.
Every time a question is move to another one, the
new text that replace the old one is from a question with an ExpressionScript. We thus wonder if we misused it or if ExpressionScript are unstable.
The ExpressionScripts we use in this survey are often of this type (check of the participant age) :
<span class="custom-warnings" style="color:#c0392b;">{if((V5Q2tab_V5Q2 == 9) && (regexMatch('/^([1-9]|10)$/', V118a_other) || (is_empty(V118a_other))),"", if((V5Q2tab_V5Q2 ==

&& (regexMatch('/^([1-9]|[1][0-1])$/', V118a_other) || (is_empty(V118a_other))),"", if((V5Q2tab_V5Q2 == 1) && (regexMatch('/^([1-9]|[1][0-8])$/', V118a_other) || (is_empty(V118a_other))),"",if((V5Q2tab_V5Q2 == 2) && (regexMatch('/^([1-9]|[1][0-7])$/', V118a_other) || (is_empty(V118a_other))),"",if((V5Q2tab_V5Q2 == 3) && (regexMatch('/^([1-9]|[1][0-6])$/', V118a_other) || (is_empty(V118a_other))),"",if((V5Q2tab_V5Q2 == 4) && (regexMatch('/^([1-9]|[1][0-5])$/', V118a_other) || (is_empty(V118a_other))),"",if((V5Q2tab_V5Q2 == 5) && (regexMatch('/^([1-9]|[1][0-4])$/', V118a_other) || (is_empty(V118a_other))),"",if((V5Q2tab_V5Q2 == 6) && (regexMatch('/^([1-9]|[1][0-3])$/', V118a_other) || (is_empty(V118a_other))),"",if((V5Q2tab_V5Q2 == 7) && (regexMatch('/^([1-9]|[1][0-2])$/', V118a_other) || (is_empty(V118a_other))),"",if(is_empty(V5Q2tab_V5Q2) && (regexMatch('/^([1-9]|[1][0-8])$/', V118a_other) || (is_empty(V118a_other))),"","Merci d'entrer un âge inférieur ou égal au tien"))))))))))}</span>
In this code the variable are:
- V5Q2tab_V5Q2 : year of birth from 2004 to 2012 (coded 1 to 9)
- V118a_other : age at the event X
And the
custom.css code associated with the new class “custom-warnings” is:.custom-warnings{
font-family: Verdana, sans-serif;
font-size:14px;
font-weight:bold;
}
The only code in
custom.js is the following:
$(document).ready(function() {
$(document).find("input:checked[type='radio']").addClass('bounce');
$("input[type='radio']").click(function() {
$(this).prop('checked', false);
$(this).toggleClass('bounce');
if( $(this).hasClass('bounce') ) {
$(this).prop('checked', true);
$(document).find("input:not(:checked)[type='radio']").removeClass('bounce');
}
});
});
Of note,
all the ExpressionScript we use have the class “custom-warnings”.If it is of any help, here is a
list of option we use in the survey:
- Conditions (hide or not a question based on user answer)
- ExpressionScript (show a message if answers seem incoherent)
- Custom.css and custom.js in the theme code
- Survey in two langage (german and french)
- Several survey with same question group
Thanks in advance for your help