Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Mandatory rows in array

Re: Mandatory rows in array 2 years 4 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_survey_47544.lss
File Size: 24 KB


Here you go
The administrator has disabled public write access.

Re: Mandatory rows in array 2 years 4 months ago #81770

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4281
  • Thank you received: 807
  • Karma: 370
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.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
Last Edit: 2 years 4 months ago by tpartner.
The administrator has disabled public write access.
The following user(s) said Thank You: Bourbon

Re: Mandatory rows in array 2 years 4 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.

Re: Mandatory rows in array 2 years 4 months ago #81811

  • Mazi
  • Mazi's Avatar
  • NOW ONLINE
  • LimeSurvey Team
  • Posts: 5333
  • Thank you received: 296
  • Karma: 249
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.
  • Page:
  • 1
  • 2
Moderators: ITEd
Time to create page: 0.119 seconds
Donation Image