Problem with numeric array type question

More
4 years 3 months ago #97221 by mattias01
mattias01 created the topic: Problem with numeric array type question
I would like to validate this type of question, for example the number selected in row 1 can not select the same in row two


Attachment answer.png not found



<script type="text/javascript">
 
var preguntaI_1 = '#answer588446X306X2976P16_1_1';
var preguntaI_2 = '#answer588446X306X2976P16_2_1';
 
 
  $(document).ready(function() {
        $(preguntaI_2).change(function() {
            if ($(this).val() == $(preguntaI_1).val()) {
                alert('equal');
            } else {
                alert('diferent');
            }
        });
    });
 
</script>
 


regards
Attachments:

Please Log in to join the conversation.

More
4 years 3 months ago #97304 by DenisChenu
DenisChenu replied the topic: Problem with numeric array type question
Hello,

Maybe something like this with EM directly:
(QQ_SQ1_SQ1!=QQ_SQ1_SQ2 and QQ_SQ1_SQ1!=QQ_SQ1_SQ3 and QQ_SQ1_SQ1!=QQ_SQ1_SQ4 .... )
and
(QQ_SQ2_SQ1!=QQ_SQ2_SQ2 and QQ_SQ2_SQ1!=QQ_SQ2_SQ3 and QQ_SQ2_SQ1!=QQ_SQ2_SQ4 .... )
and
..

Look at :
Sub-question validation equation (em_validation_sq)
And
Expression Manager (maybe you can use some function, like countif ?)

Denis

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now