- Posts: 14
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
numeric input with alternative radio button
- greenwoodtree
- Topic Author
- Offline
- New Member
Less
More
2 years 10 months ago #217235
by greenwoodtree
numeric input with alternative radio button was created by greenwoodtree
Hi, I tried to adapt a 2-yr-old post, which was super-interesting (118353-multiple-numerical-inputs-sum-up-to-100-or-alternatively-a-radio-button) to add two questions to my survey, which both ask a numeric question with a 'I'd prefer not to say' option. I adapted the example question presented in this forum, but they do not work together, so obviously I am missing something in the coding. I do not need the 100% sum, so this is maybe where I go wrong. We subscribe to Limesurvey Professional and the version is
Version 3.25.21
. I attach the two questions in a dummy survey - sorry it is obviously very wrong, but if there is any help, I'd be very grateful (as ever!). Thanks - ForestryLime
Attachments:
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12912
- Thank you received: 3975
2 years 10 months ago #217237
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic numeric input with alternative radio button
Hi,
in my opinion everything is working fine,
IF you place the two questions on two pages,
And In my opinion you should change this
if($(this).is(':checked')) {
$('input:text', thisQuestion).not(lastInput).val('').trigger('keyup');
$(lastInput).val(100).trigger('keyup');
$('li.ls-group-dynamic', thisQuestion).hide();
}
100 is a valid value. So you shouldn't use it as code of "Don't know". Better a value that will never be entered, "-1" or "999999".
Joffm
in my opinion everything is working fine,
IF you place the two questions on two pages,
And In my opinion you should change this
if($(this).is(':checked')) {
$('input:text', thisQuestion).not(lastInput).val('').trigger('keyup');
$(lastInput).val(100).trigger('keyup');
$('li.ls-group-dynamic', thisQuestion).hide();
}
100 is a valid value. So you shouldn't use it as code of "Don't know". Better a value that will never be entered, "-1" or "999999".
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
- greenwoodtree
- Topic Author
- Offline
- New Member
Less
More
- Posts: 14
- Thank you received: 0
2 years 10 months ago #217240
by greenwoodtree
Replied by greenwoodtree on topic numeric input with alternative radio button
Thanks for your help. So, the problem is solved if they are on separate pages. That is quite strange - not ideal for my survey structure, but it is a neat looking question format and if there is no way to keep them together I will separate them (and edit the val=100 as you suggest)
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10108
- Thank you received: 3593
2 years 10 months ago #217247
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 numeric input with alternative radio button
Denis has a plugin for this -
gitlab.com/SondagesPro/QuestionSettingsType/checkboxForText
(if using the professional hosted version, you will have to ask support to install it for you)
(if using the professional hosted version, you will have to ask support to install it for you)
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- greenwoodtree
- Topic Author
- Offline
- New Member
Less
More
- Posts: 14
- Thank you received: 0
2 years 10 months ago #217250
by greenwoodtree
Replied by greenwoodtree on topic numeric input with alternative radio button
That looks really useful! I will follow this up. Cheers
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12912
- Thank you received: 3975
2 years 10 months ago #217251
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic numeric input with alternative radio button
I wanted to show it this morning.
Unfortunately my wife called me for breakfast, and as many here know: I seem to suffer from Alzheimer
Unfortunately my wife called me for breakfast, and as many here know: I seem to suffer from Alzheimer
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: DenisChenu
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13637
- Thank you received: 2491
2 years 10 months ago #217268
by DenisChenu
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 numeric input with alternative radio button
Must create a QuestionTheme for this …Denis has a plugin for this - gitlab.com/SondagesPro/QuestionSettingsType/checkboxForText
(if using the professional hosted version, you will have to ask support to install it for you)
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.