Welcome, Guest
Username: Password: Remember me

TOPIC: Convalidation with EM

Convalidation with EM 10 months 5 days ago #102703

  • darpao
  • darpao's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 3
  • Karma: 0
Who can help me with this situation.

I crete an example, but what I should do is similar. See atteched file.

Q1 -> ask in a multiple choice with comments what are the components of a family. No matter if the user put one person and choice slot 4 (Person 4) instead of the first available. Only for person I ask name. So I hided the box for animals with javascript (1° request: is there a way to hide comments with EM or something else?)

if a people choice a Person, he MUST fill the comment (2° request: how I can force people to put comments?JavaScript?)

Q2 -> I show only the previous components choosen, showing the name if it was written in the comment (this is the only thing I was succesfull by myself). For each one (3° request: how can I validate if for every row of visible components a role was choosen.. so at least one check for every visible row) the user must choose a role.
Some roles are mandatory: every family must have an head of household, but it should be possible that nobody works and bring money (4° request: how can I make mandatory some columns? So a column can have 0 chcked answer, others must have at least 1 answer. All can have more than 1 answer)

(5° request: how can I disable some checkbox?) For example animals cannot work and bring money, so I would like to disable the corrisponding checkbox so that the user cannot click on it.

All these request require javascript? Or can I use validation with EM?

Where I can study some syntax about Javascript specific for Limesurvey? I read scripts and I find:
#Question..
#Answer...
#question' + qID + ' table.question tbody tr';
$( arrayRow + ':eq(' + i + ') input.radio:checked' ).length

and so on..
but I was not able to find a manual.

Thank you
Attachments:
Last Edit: 10 months 5 days ago by darpao. Reason: added a question
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.096 seconds
Donation Image