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
  • schmitty's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 3 months ago #144898 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.
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
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 3 months ago #144903 by Joffm
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

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 3 months ago #144913 by holch
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
  • DenisChenu's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 3 months ago #145093 by DenisChenu
Hi :

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.

Lime-years ahead

Online-surveys for every purse and purpose