- Posts: 61
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Refer to numerical input in 'Other' option to radio list
- FranzGerbig
- Topic Author
- Offline
- Senior Member
Less
More
7 years 9 months ago #138320
by FranzGerbig
using LS 3.13.2+180709
Refer to numerical input in 'Other' option to radio list was created by FranzGerbig
Hi folks,
how may one refer to the number typed into the 'Other' input box added to a radio list?
e.g.
Have moved to another town since the last interview?
No,
Yes, once
Yes, several times: _ _
Later questions and sub-questions I need to filter depending on the number put in before ...
Some idea?
how may one refer to the number typed into the 'Other' input box added to a radio list?
e.g.
Have moved to another town since the last interview?
No,
Yes, once
Yes, several times: _ _
Later questions and sub-questions I need to filter depending on the number put in before ...
Some idea?
using LS 3.13.2+180709
The topic has been locked.
- steve_81
- Offline
- Premium Member
Less
More
- Posts: 136
- Thank you received: 37
7 years 9 months ago #138322
by steve_81
Replied by steve_81 on topic Refer to numerical input in 'Other' option to radio list
Hi,
if I understand correctly you can refer to this input with:
if I understand correctly you can refer to this input with:
Code:
{Q1_other}
The following user(s) said Thank You: FranzGerbig
The topic has been locked.
- FranzGerbig
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 61
- Thank you received: 0
7 years 9 months ago #138327
by FranzGerbig
using LS 3.13.2+180709
Replied by FranzGerbig on topic Refer to numerical input in 'Other' option to radio list
Yes, you do
Thx a lot Steve!
works fine
# Name Relevance
SQ-2 online053_2 online052_other > 1
Thx a lot Steve!
works fine
# Name Relevance
SQ-2 online053_2 online052_other > 1
using LS 3.13.2+180709
The topic has been locked.
- FranzGerbig
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 61
- Thank you received: 0
7 years 9 months ago #138331
by FranzGerbig
using LS 3.13.2+180709
Replied by FranzGerbig on topic Refer to numerical input in 'Other' option to radio list
... and is there a way to define a maximum for that input?
using LS 3.13.2+180709
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10634
- Thank you received: 3698
7 years 9 months ago - 7 years 9 months ago #138333
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 Refer to numerical input in 'Other' option to radio list
There is no question validation equation for list-radio questions. I think the easiest solution would be to have a separate numeric question for the "Other" amount, displayed with relevance. Then you can place a "Maximum value" value on it.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 7 years 9 months ago by tpartner.
The following user(s) said Thank You: FranzGerbig
The topic has been locked.
- FranzGerbig
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 61
- Thank you received: 0
7 years 9 months ago #138334
by FranzGerbig
using LS 3.13.2+180709
Replied by FranzGerbig on topic Refer to numerical input in 'Other' option to radio list
I hoped to be able to avoid this (default) way around
using LS 3.13.2+180709
The topic has been locked.
- steve_81
- Offline
- Premium Member
Less
More
- Posts: 136
- Thank you received: 37
7 years 9 months ago - 7 years 9 months ago #138338
by steve_81
Replied by steve_81 on topic Refer to numerical input in 'Other' option to radio list
You may use a workaround with a hidden numeric question. It is not as comfortable as with the default input with other, but maybe it is good enough.
1) add a new question directly after the option list question
2) question type for this new question is numerical input. There you can define a maximum.
3) in the option list question:
a) option 'other' -> off
b) add this code to the questiontext (with click on Source):
c) in the 'edit answer options' add your text in the third option ("Yes, several times:")
Should work with 2.50 and at least the default template.
Edit: I guess you have to mention in the question text or anywhere else, that there is a maximum for the input.
1) add a new question directly after the option list question
2) question type for this new question is numerical input. There you can define a maximum.
3) in the option list question:
a) option 'other' -> off
b) add this code to the questiontext (with click on Source):
Code:
<script type="text/javascript" charset="utf-8"> $(document).ready(function() { // Identify the questions var q1 = $('#question'+{QID}+''); var q2 = $(q1).nextAll('.numeric:eq(0)'); // Hide the numeric question $(q2).hide(); // Move the hidden numeric input into the option list $('.label-text:last', q1).append($('input', q2)); // Some styling... $('input', q1).css({ 'width': '20%', }); }); </script>
Should work with 2.50 and at least the default template.
Edit: I guess you have to mention in the question text or anywhere else, that there is a maximum for the input.
Attachments:
Last edit: 7 years 9 months ago by steve_81.
The following user(s) said Thank You: FranzGerbig
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13935
- Thank you received: 2551
7 years 9 months ago #138344
by DenisChenu
bugs.limesurvey.org/view.php?id=8941
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Refer to numerical input in 'Other' option to radio list
Vote , vitetpartner wrote: There is no question validation equation for list-radio questions.....
bugs.limesurvey.org/view.php?id=8941
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
- FranzGerbig
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 61
- Thank you received: 0
7 years 9 months ago #138346
by FranzGerbig
using LS 3.13.2+180709
Replied by FranzGerbig on topic Refer to numerical input in 'Other' option to radio list
great, but only works with both questions on the same page (not with question by question-format of the survey) , right?
using LS 3.13.2+180709
The topic has been locked.
- steve_81
- Offline
- Premium Member
Less
More
- Posts: 136
- Thank you received: 37
7 years 9 months ago #138347
by steve_81
Replied by steve_81 on topic Refer to numerical input in 'Other' option to radio list
I think you are right.
Due to the design, yes. I never use question by question, sorry.
Due to the design, yes. I never use question by question, sorry.
The following user(s) said Thank You: FranzGerbig
The topic has been locked.
- FranzGerbig
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 61
- Thank you received: 0
7 years 8 months ago #139081
by FranzGerbig
using LS 3.13.2+180709
Replied by FranzGerbig on topic Refer to numerical input in 'Other' option to radio list
Sorry, I need to go back again:
May it be a condition/part of relevance equation that a respondent selects the _other option but doesn´t enter any number into the field? Like ...
q1_other == "Y"
or sth like that? As I'd know, he/she did it several times (just not how many times) the case would still be valid/useful for some of the following questions.
Put clear? :huh:
May it be a condition/part of relevance equation that a respondent selects the _other option but doesn´t enter any number into the field? Like ...
q1_other == "Y"
or sth like that? As I'd know, he/she did it several times (just not how many times) the case would still be valid/useful for some of the following questions.
Put clear? :huh:
using LS 3.13.2+180709
The topic has been locked.