clearall and restart single click

More
1 month 3 days ago - 1 month 3 days ago #202565 by sicoda_limesurvey
How can I put a Restart Button within a Text-Question that immediately clears the responses and jumps back to the start of the survey?

So far I found the original clear all function as:
<a href="#" data-limesurvey-submit='{ "clearall":"clearall" }'  data-confirmedby='{ "confirm-clearall":"confirm" }' data-confirmlabel='Please confirm you want to clear your response?' class=' ls-link-action ls-link-clearall  animate'  >Exit and clear survey</a>



This function opens a Pop Up with the confirmation Text. After that you will see a link to Restart.

The ideal way would be to directly clear all answers and go back to start. The second beste way would be to at least get rid of the confirmation pop up.

Txh Olivder
Last edit: 1 month 3 days ago by sicoda_limesurvey.

Please Log in to join the conversation.

LimeSurvey Partners
More
1 month 2 days ago #202572 by holch

The ideal way would be to directly clear all answers and go back to start.

Not a solution, but maybe food for thought...

I think if you do it this way, you'll probably get a lot of complaints that will tell you, that they didn't know that "leave and delete everything" meant that everything would be deleted... ;-)

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

Please Log in to join the conversation.

More
1 month 2 days ago #202577 by sicoda_limesurvey
I fully agree to that on a general user perspective and basis. I do have a special usage szenario where this is will only be shown on special conditions.

Please Log in to join the conversation.

More
1 month 2 days ago #202584 by DenisChenu
<button type="submit" name="clearall" value="clearall" class="ls-clearaction ls-clearall btn btn-link" >Exit and clear survey</button>
<input value="confirm" name="confirm-clearall" type="hidden" class="hidden">

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.

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now