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
  • Mazi's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
8 years 6 months ago #126303 by Mazi

holch wrote: There was a workaround of Tpartner somewhere that actually had the option of "adding" an additional answer option by clicking on a button, if I remember right. But this was quite a while ago. You would have to search the workaround section and the forum to see if you can find it.

There it is: manual.limesurvey.org/Workarounds:_Manip...ble_Text.29_question
Demo: www.partnersinc.biz/surveys//index.php?s...32&newtest=Y&lang=en

But you may have to adjust this depending on which template you are using.

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
  • DOwen's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
8 years 6 months ago #126305 by DOwen
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 :(
The topic has been locked.
  • Mazi
  • Mazi's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
8 years 6 months ago #126307 by Mazi

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 :(

Since the JavaScript code depends on the HTML structure and thus on the template, that is probably the reason this is not working.

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
  • DOwen's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
8 years 6 months ago - 8 years 6 months ago #126308 by DOwen
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!
Last edit: 8 years 6 months ago by DOwen.
The topic has been locked.
  • tammo
  • tammo's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
8 years 6 months ago #126309 by tammo
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


Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
The topic has been locked.
  • DOwen
  • DOwen's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
8 years 6 months ago - 8 years 6 months ago #126310 by DOwen
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!
Last edit: 8 years 6 months ago by DOwen.
The topic has been locked.
  • DOwen
  • DOwen's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
8 years 6 months ago #126343 by DOwen
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 topic has been locked.
More
8 years 6 months ago #126348 by Ben_V
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....
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
  • Mazi's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
8 years 6 months ago #126354 by Mazi

DOwen wrote: The survey should now be public so you can check it out. (May take 10 mins as of this email)

Though there are no JavaScript errors the structure of your survey HTML seems to differ so the JavaScript can't access the needed elements.

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
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 6 months ago #126366 by holch
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
  • DOwen's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
8 years 6 months ago #126453 by DOwen
Hey Ben, thanks for this!

However just tried it out but can't seem to get it working; no '+' symbols are showing...
The topic has been locked.
  • DOwen
  • DOwen's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
8 years 6 months ago #126455 by DOwen

Mazi wrote:

DOwen wrote: The survey should now be public so you can check it out. (May take 10 mins as of this email)

Though there are no JavaScript errors the structure of your survey HTML seems to differ so the JavaScript can't access the needed elements.

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.

Lime-years ahead

Online-surveys for every purse and purpose