- Posts: 16
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Variable Length Array not working
- harvas
- Topic Author
- Offline
- New Member
Less
More
6 years 2 months ago #164065
by harvas
Variable Length Array not working was created by harvas
Hello all,
I am trying to create a dynamic array for adding and removing rows. I am using Version 3.3.0+180209 and came across the following workaround for this purpose. I have updated the custom.js of an extended theme accordingly but unfortunately the code is not working as expected. Below is the link:
manual.limesurvey.org/Workarounds:_Manip...ble_Text.29_question .
Any suggestions for changes or hints as to what might be wrong will be highly appreciated.
Thank you.
Charis
I am trying to create a dynamic array for adding and removing rows. I am using Version 3.3.0+180209 and came across the following workaround for this purpose. I have updated the custom.js of an extended theme accordingly but unfortunately the code is not working as expected. Below is the link:
manual.limesurvey.org/Workarounds:_Manip...ble_Text.29_question .
Any suggestions for changes or hints as to what might be wrong will be highly appreciated.
Thank you.
Charis
The topic has been locked.
- harvas
- Topic Author
- Offline
- New Member
Less
More
- Posts: 16
- Thank you received: 0
6 years 1 month ago #164492
by harvas
Replied by harvas on topic Variable Length Array not working
Just to inform that this now has been changed to work accordingly. The following changes are in order:
Row 21-22:
$( 'div#addButton'+qID ).appendTo($( '#question' + qID + ' table.ls-answers' ).parent());
$( 'div#removeButton'+qID ).appendTo($( '#question' + qID + ' table.ls-answers' ).parent());
Row 63:
var arrayRow = '#question' + qID + ' table.ls-answers tr.subquestion-list';
Row 76:
var arrayRow = '#question' + qID + ' table.ls-answers tr.subquestion-list';
Row 87:
var arrayRow = '#question' + qID + ' table.ls-answers tr.subquestion-list';
Row 21-22:
$( 'div#addButton'+qID ).appendTo($( '#question' + qID + ' table.ls-answers' ).parent());
$( 'div#removeButton'+qID ).appendTo($( '#question' + qID + ' table.ls-answers' ).parent());
Row 63:
var arrayRow = '#question' + qID + ' table.ls-answers tr.subquestion-list';
Row 76:
var arrayRow = '#question' + qID + ' table.ls-answers tr.subquestion-list';
Row 87:
var arrayRow = '#question' + qID + ' table.ls-answers tr.subquestion-list';
The topic has been locked.
- jelo
- Offline
- Platinum Member
Less
More
- Posts: 5033
- Thank you received: 1257
6 years 1 month ago - 6 years 1 month ago #164497
by jelo
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Replied by jelo on topic Variable Length Array not working
Thanks for your post. You should add your solution to the manual. Just copy the entry and add a "LS 3.0 tested" remark after modifying the copied entry. Nobody will find this post in a few weeks, but the manual with workarounds will be in place.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Last edit: 6 years 1 month ago by jelo.
The following user(s) said Thank You: harvas
The topic has been locked.