Welcome, Guest
Username: Password:

TOPIC: Mandatory rows in array

Mandatory rows in array 3 years 11 months ago #81767

  • Bourbon
  • Bourbon's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 19
  • Karma: 0
tpartner wrote:
Please supply a sample question or survey so I can test.


File Attachment:

File Name: limesurvey...7544.lss
File Size:24 KB


Here you go
The administrator has disabled public write access.

Mandatory rows in array 3 years 11 months ago #81770

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 5892
  • Thank you received: 1291
  • Karma: 520
If making all but the last row mandatory, replace this:
$('div#question'+qID+' table.question tbody[id^="javatbd"]:not(:last) tr').addClass('mandatory');
With this:
$('div#question'+qID+' table.question tbody[id^="javatbd"]:not(:last) tr:not(.headings)').addClass('mandatory');


If making all rows mandatory, replace this:
$('div#question'+qID+' table.question tbody[id^="javatbd"] tr').addClass('mandatory');
With this:
$('div#question'+qID+' table.question tbody[id^="javatbd"] tr:not(.headings)').addClass('mandatory');
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last Edit: 3 years 11 months ago by tpartner.
The administrator has disabled public write access.
The following user(s) said Thank You: Bourbon

Mandatory rows in array 3 years 11 months ago #81771

  • Bourbon
  • Bourbon's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 19
  • Karma: 0
Thank you tpartner !!!

It works great!
The administrator has disabled public write access.

Mandatory rows in array 3 years 11 months ago #81811

  • Mazi
  • Mazi's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 5964
  • Thank you received: 363
  • Karma: 259
Bourbon wrote:
Thank you tpartner !!!

It works great!
You're welcome :-)

If our hints have been helpful and you enjoy limesurvey please consider a donation to give Limesurvey a future .
We do all this in our free time and you don't have to pay a penny for this software.

Without your help we can't keep this project alive.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 1.207 seconds