Check out the LimeSurvey source code on GitHub!
Welcome, Guest
Username: Password:

TOPIC: Text or number input with additional answer options

Text or number input with additional answer options 4 years 8 months ago #77300

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 5417
  • Thank you received: 806
  • Karma: 239
I am currently working on a questionnaire, which is more for data entry of a paper & pencil questionnaire, so there are some things a little different.

I do have quite often the need to ask a value, but then give the options of "don't know" or "No answer".

What was the purchasing price of your vehicle?

$ __________

Don't know Code 8
No answer Code 9

I tried to solve it with a "list with comment" and there is only one field for the value, which is good. But it is a big field.

Then I tried it with "multiple with comments", which looks better. Then I tried to limit max. and min. answers, which doesn't seem to work.

Does anyone have a better idea?
Have a look at the manual! It is a really valuable source for information. Here some helpful links:
Manual (EN) | Question Types | [url=https://manual.limesurvey.org/Workarounds[/url]

If you found this answer helpful and it saved you some time please consider a [url=https://donate.limesurvey.org[/url] to the...
The administrator has disabled public write access.

Text or number input with additional answer options 4 years 8 months ago #77312

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6566
  • Thank you received: 1477
  • Karma: 578
Hi Holch,

I don't think you'll be able to do it properly with one question. I think you'll need a multiple-options (so they can be unchecked) set to max answers = 1 and a short-text or numeric question.

Then I see 2 options for presenting them:

1) Use CSS to make the questions appear as one and put a condition on the text question so it is only displayed if no multiple-options are checked.

2) Use a little JavaScript to:
- Hide the text question
- Move the text input field into the multiple-options question
- Make the text input field and the checkboxes exclusive

I can help with either option if you give me a small sample survey and let me know what template you are using.
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The administrator has disabled public write access.
Time to create page: 0.184 seconds
Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form