- Posts: 1
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
No response registered after disabling radiobutton onchange
- schmitty
- Topic Author
- Offline
- New Member
Less
More
7 years 4 months ago #144898
by schmitty
No response registered after disabling radiobutton onchange was created by schmitty
Hi all
I'm trying to build a quiz with 13 questions ordered into 13 groups. Each question is a true/false with immediate feedback given to the participant via a relevance equation in another Text Display question in the same group.
To prevent participants from changing their response once they've learned the correct answer, I added some javascript to the main question, e.g.
However...this seems to disable any of the responses being registered once I activate the survey? I've attached a screenshot of a subset of questions with responses (showing that only the question without the disabling javascript has registered the answer).
The javascript only disables the radiobuttons after selection...so I don't quite understand why no answer is logged.
I'm trying to build a quiz with 13 questions ordered into 13 groups. Each question is a true/false with immediate feedback given to the participant via a relevance equation in another Text Display question in the same group.
To prevent participants from changing their response once they've learned the correct answer, I added some javascript to the main question, e.g.
Code:
<script type="text/javascript" charset="utf-8"> $(document).ready(function() { $('#answer217813X42X880').change(function() { $('#answer217813X42X880').attr('disabled', 'disabled'); $('#answer217813X42X881').attr('disabled', 'disabled'); }); $('#answer217813X42X881').change(function() { $('#answer217813X42X880').attr('disabled', 'disabled'); $('#answer217813X42X881').attr('disabled', 'disabled'); }); }); </script>
However...this seems to disable any of the responses being registered once I activate the survey? I've attached a screenshot of a subset of questions with responses (showing that only the question without the disabling javascript has registered the answer).
The javascript only disables the radiobuttons after selection...so I don't quite understand why no answer is logged.
Attachments:
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12790
- Thank you received: 3940
7 years 4 months ago #144903
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic No response registered after disabling radiobutton onchange
Hi, schmitty,
so each group only contains the question and the feedback.
Why don't you ask "question by question" without a "Previous"-Button?
You could repeat the question and pipe the given answer to the feedback page, and then explain, why it was wrong, and general sights of the problem, or whatever. (as you seem to do it)
Best regards
Joffm
so each group only contains the question and the feedback.
Why don't you ask "question by question" without a "Previous"-Button?
You could repeat the question and pipe the given answer to the feedback page, and then explain, why it was wrong, and general sights of the problem, or whatever. (as you seem to do it)
Best regards
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11758
- Thank you received: 2753
7 years 4 months ago #144913
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 No response registered after disabling radiobutton onchange
Seems like question and the information of the correct answer are on the same page. At the moment when you disable the radio button it has not been saved to the database yet, so I guess disabling will prevent it from writing result to database.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13935
- Thank you received: 2551
7 years 4 months ago #145093
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 No response registered after disabling radiobutton onchange
Hi :
input disabled : NOTHING send to server.
Use readonly , not disabled.see developer.mozilla.org/en/docs/Web/HTML/Element/Input
input disabled : NOTHING send to server.
Use readonly , not disabled.see developer.mozilla.org/en/docs/Web/HTML/Element/Input
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.