Hi, Carlotta,
your validation works - though there are a few unnecessary things (see below).
But your script to add the checkboxes seems to be very strange.
You see there is a part about "exclusive items". But you do not handle "exclusive items" and the class "'.exclusive-item" is nowhere added.
Then the "Returning to page" part.
This is copied from the other script, isn't it.
But here you use a class ".with-select" which is not defined in this script, but in one of the first lines of the other script
// Insert selects
$('.answer-item.answer_cell_X005', thisQuestion).addClass('with-select').append('<select class="inserted-select form-control list-question-....
where you really insert "selects".
I do not know where you found this script, but because I am absolutely unable to write javascript code myself I can't help.
I found these three scripts.
[url]
forums.limesurvey.org/forum/french-forum...ns-un-tableau#231392
[/url]
Remove the part with the "Insert selects" till "Insert checkboxes" drop-down and set the ONE chckbox into the fifth column.
Here is something with "exclusive checkboxes".
[url]
forums.limesurvey.org/forum/can-i-do-thi...ith-radiolist#226020
[/url]
Here the two last checkboxes are really exclusive. If checked the rest of the row is emptied.
And this third seems to fulfill your wishes.
[url]
forums.limesurvey.org/forum/can-i-do-thi...sive-checkbox#177208
[/url]
Now a word about the validation itself
These two lines (the second and the third part of each subquestion)
(is_empty(Q2_Y001_X004.NAOK) AND is_empty(Q2_Y001_X003.NAOK) AND
is_empty(Q2_Y001_X005.NAOK)) OR
(is_empty(Q2_Y001_X004.NAOK) AND is_empty(Q2_Y001_X003.NAOK) AND
!is_empty(Q2_Y001_X005.NAOK) OR ...
So no matter if Q2_Y001_X005 is empty or not and no matter what follows after this second line, this validation is TRUE if X003 and X004 are empty (because of the OR operation)
Joffm