Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
How to create a question with the option to add another line?
- Mazi
- Offline
- Official LimeSurvey Partner
Less
More
8 years 6 months ago #126307
by Mazi
Please post a link to an activated test survey so we can have a look. It may be easy to fix if it is just a typo or a different class name within the HTML structure but if the template structure is completely different, you may need some professional help to adjust everything (feel free to ping me at marcel.minke@limesurvey.org).
Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
Replied by Mazi on topic How to create a question with the option to add another line?
Since the JavaScript code depends on the HTML structure and thus on the template, that is probably the reason this is not working.DOwen wrote: I've tried this with array questions to test it (as well as other question types) but cannot get it to work. Whether I put the scipt inside the .JS file or the question/group description
Please post a link to an activated test survey so we can have a look. It may be easy to fix if it is just a typo or a different class name within the HTML structure but if the template structure is completely different, you may need some professional help to adjust everything (feel free to ping me at marcel.minke@limesurvey.org).
Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
The topic has been locked.
- DOwen
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 68
- Thank you received: 0
8 years 6 months ago - 8 years 6 months ago #126308
by DOwen
Replied by DOwen on topic How to create a question with the option to add another line?
Hi thanks for your reply!
Here's a link to the activated test survey: Test Survey
I have moved the Array question to the beginning, ignore the rest of the survey. It seems that even the plus and minus buttons are no longer appearing now.
Thank you!
Here's a link to the activated test survey: Test Survey
I have moved the Array question to the beginning, ignore the rest of the survey. It seems that even the plus and minus buttons are no longer appearing now.
Thank you!
Last edit: 8 years 6 months ago by DOwen.
The topic has been locked.
- tammo
- Offline
- Official LimeSurvey Partner
Less
More
- Posts: 967
- Thank you received: 220
8 years 6 months ago #126309
by tammo
Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
Replied by tammo on topic How to create a question with the option to add another line?
huddle.rockit.com/index.php/224571?lang=en
Not Found
The requested URL /index.php/224571 was not found on this server.
Did you activate the survey?
Tammo
Not Found
The requested URL /index.php/224571 was not found on this server.
Did you activate the survey?
Tammo
Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
The topic has been locked.
- DOwen
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 68
- Thank you received: 0
8 years 6 months ago - 8 years 6 months ago #126310
by DOwen
Replied by DOwen on topic How to create a question with the option to add another line?
Sorry guys! Our server is internally accessible only. I've contacted the IT administrator to make it public, will let you know when its accessible.
Also, the plus and minus buttons mysteriously appeared. However they do not bring up new array text fields.
Thanks!
Also, the plus and minus buttons mysteriously appeared. However they do not bring up new array text fields.
Thanks!
Last edit: 8 years 6 months ago by DOwen.
The topic has been locked.
- DOwen
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 68
- Thank you received: 0
8 years 6 months ago #126343
by DOwen
Replied by DOwen on topic How to create a question with the option to add another line?
Hi guys,
The survey should now be public so you can check it out. (May take 10 mins as of this email)
Link here
Thanks!
The survey should now be public so you can check it out. (May take 10 mins as of this email)
Link here
Thanks!
The topic has been locked.
- Ben_V
- Offline
- Platinum Member
Less
More
- Posts: 1128
- Thank you received: 329
8 years 6 months ago #126348
by Ben_V
Benoît
EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
Replied by Ben_V on topic How to create a question with the option to add another line?
Another more basic approach is the use of a multiple-opt (not mandatory) question with just one option "Add another product" with the related checkbox (check/uncheck)
Remember that you can style this question with CSS and/or javascript
Try-it, pasting the following code in the help area of the question....
Remember that you can style this question with CSS and/or javascript
Try-it, pasting the following code in the help area of the question....
Code:
<script type="text/javascript"> $(document).ready(function() { $( "<style type='text/css'>" + "#question{QID} { border:none; font-size:120%}" +"</style>").appendTo( "head" ); }); </script>
Benoît
EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
The topic has been locked.
- Mazi
- Offline
- Official LimeSurvey Partner
8 years 6 months ago #126354
by Mazi
Check the JS and compare the elements it deals with step by step. I assume due to different HTML elements the script doesn't trigger the correct elements.
Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
Replied by Mazi on topic How to create a question with the option to add another line?
Though there are no JavaScript errors the structure of your survey HTML seems to differ so the JavaScript can't access the needed elements.DOwen wrote: The survey should now be public so you can check it out. (May take 10 mins as of this email)
Check the JS and compare the elements it deals with step by step. I assume due to different HTML elements the script doesn't trigger the correct elements.
Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
The topic has been locked.
- holch
- Away
- LimeSurvey Community Team
Less
More
- Posts: 11660
- Thank you received: 2742
8 years 6 months ago #126366
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic How to create a question with the option to add another line?
Tpartners solutions are usually based on the default template I think, so any other template might not work directly out of the box and would need to be adapted.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The following user(s) said Thank You: tpartner
The topic has been locked.
- DOwen
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 68
- Thank you received: 0
8 years 6 months ago #126453
by DOwen
Replied by DOwen on topic How to create a question with the option to add another line?
Hey Ben, thanks for this!
However just tried it out but can't seem to get it working; no '+' symbols are showing...
However just tried it out but can't seem to get it working; no '+' symbols are showing...
The topic has been locked.
- DOwen
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 68
- Thank you received: 0
8 years 6 months ago #126455
by DOwen
Just tried to see if I could pick out any issues with the HTML vs the JS, but struggling. Javascript is not my best skill unfortunately!
Replied by DOwen on topic How to create a question with the option to add another line?
Mazi wrote:
Though there are no JavaScript errors the structure of your survey HTML seems to differ so the JavaScript can't access the needed elements.DOwen wrote: The survey should now be public so you can check it out. (May take 10 mins as of this email)
Check the JS and compare the elements it deals with step by step. I assume due to different HTML elements the script doesn't trigger the correct elements.
Just tried to see if I could pick out any issues with the HTML vs the JS, but struggling. Javascript is not my best skill unfortunately!
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3593
8 years 6 months ago #126458
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic How to create a question with the option to add another line?
DOwen, the linked survey is not accessible. Can you please attach a sample exported .lss file containing only your array question and the associated JavaScript and an exported zip of your template?
I am just returning from vacation so won't have a lot of free time for the next few days but I'll try to have a quick look.
I am just returning from vacation so won't have a lot of free time for the next few days but I'll try to have a quick look.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- DOwen
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 68
- Thank you received: 0
8 years 6 months ago #126459
by DOwen
Replied by DOwen on topic How to create a question with the option to add another line?
Hi tpartner, thanks for this!
I had just temporarily taken down the survey but its back up again now. The questions haven't been edited much, just want to make sure the functionality we need works first.
I appreciate you taking time to take a look, thanks!
I had just temporarily taken down the survey but its back up again now. The questions haven't been edited much, just want to make sure the functionality we need works first.
I appreciate you taking time to take a look, thanks!
The topic has been locked.