Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Adding Reset button (Array and List)

  • msalum1
  • msalum1's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
2 years 3 months ago #232689 by msalum1
Adding Reset button (Array and List) was created by msalum1
(Write here your question/remark) Please help us help you and fill where relevant:
Your LimeSurvey version: [see right hand bottom of your LimeSurvey admin screen]  LimeSurvey Community Edition   Version 5.4.3+220926
Own server or LimeSurvey hosting: University/organization  
Survey theme/template: Array and List (radio)
==================How can I add a reset button? I tried copying the Java Codes on the following thread, but the button seems not to work. I tried the code found on this thread, but it didn't work, maybe because it's suitable for older versions only.  I'm using two formats: an Array and a list, non-mandatory answers, and "No answer" is hidden. I wanted to put a reset button on the right side of the table that reverts to empty answers. Please see the image below.    
 Here's the code I used for the Array but it is not working.

Attachment not found

Attachment not found


 <script type="text/javascript" charset="utf-8">    
    $(document).ready(function(){
 
        addReset('{QID}');
 
        function addReset(qID) {
            $('#question'+qID+' table.subquestions-list thead tr').append('<th />');
            $('#question'+qID+' tr.answers-list').append('<td class="buttonCell"><input type="button" value="Reset" class="resetButton" /></td>');
 
            $('#question'+qID+' .resetButton').click(function(e){
                var parentRow = $(this).closest('tr');
                $('input.radio', parentRow).attr('checked', false);
            });
        }
    });
</script>

 

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 3 months ago #232692 by Joffm
Replied by Joffm on topic Adding Reset button (Array and List)
Here
[url] forums.limesurvey.org/forum/can-i-do-thi...elect-click-in-array [/url]

Though - in my opinion - it is a silly approach.
Make the question mandatory and add the respective answer options ("I don't want to tell you")

Seeing your list(radio) example I am wondering what an empty answer means?
"I forgot to answer this question"
"I refuse to say that I prefer not to say"
Hm.
The consequence is that in your analysis you can't distinguish between "forgotten", "try to complete the survey rapidly by leaving anything empty" and an real "I do want not tell you".
Anyway, it is your survey and your decision.

Joffm


 

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

  • msalum1
  • msalum1's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
2 years 3 months ago #232743 by msalum1
Replied by msalum1 on topic Adding Reset button (Array and List)
Thanks, Joffm. Your suggestion is our first thought too. But, what we want design is that those two options have to be visibly distinct from the Likert scale answer options. Which would indicate people chose them consciously.

What I'm hoping to see is that participants should get the option to vote 'prefer not to answer or 'I don't have the expertise => these 2 options need to be set apart in the survey. They should not be at the same level as the Likert scale and be distinct from the Likert-scale voting options.

I was able to design it, but it seems like once respondents ticked an option at the Likert scale, there's no reset button if they ever changed their mind. It seems they can have an answer to both level of agreement scale and the classification of the No Response button. Please see image below. This made me think that reset button may be helpful. They should only be able to select either of them.

Is there a workaround for this?

 

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 3 months ago - 2 years 3 months ago #232746 by Joffm
Replied by Joffm on topic Adding Reset button (Array and List)
Hi,
there are many options to sepatate these two options (by color, font, font-size, spaces, etc). That's basic and there are enough examples in the forum.

But as you seem to have only one subquestion you may follow a quite different approach.
A HTML-table in the question text and inserted radio-buttons.
Read this thread to see how the radio buttons are inserted.
[url] forums.limesurvey.org/forum/can-i-do-thi...ckbox-into-the-table [/url]

Or you search for the old "Banana - green apple" example, the "grandfather" of all these layouts.

Here a rough example without styling. I only took it from the above thread and removed all unnecessary stuff.

This is only one subquestion with 7 answer options






Or something quite different.
An array(text) where exclusive checkboxes are inserted.
[url] forums.limesurvey.org/forum/can-i-do-thi...ith-radiolist#226020 [/url]

 

Adapt this code to your needs.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 2 years 3 months ago by Joffm.

Please Log in to join the conversation.

  • msalum1
  • msalum1's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
2 years 3 months ago #232749 by msalum1
Replied by msalum1 on topic Adding Reset button (Array and List)
Hi Joffm,

Thanks for your time sharing some possible layouts.

You're right, is only one subquestion with 7 answer options. I tried mimicking the layout you showed above, but I got a hilarious outcome. Please see attached survey. I tried copying the code on inserting the radio button, but only one showed up. If you have time, can you check what went wrong?

I don't have much experience using lime, but I'll try reading the links you shared further.




Many thanks all your help!
Marlo

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose