Welcome to the LimeSurvey Community Forum

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

clearall and restart single click

  • sicoda_limesurvey
  • sicoda_limesurvey's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 9 months ago - 3 years 9 months ago #202565 by sicoda_limesurvey
clearall and restart single click was created 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:
Code:
<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: 3 years 9 months ago by sicoda_limesurvey.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 9 months ago #202572 by holch
Replied by holch on topic clearall and restart single click

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.

The topic has been locked.
  • sicoda_limesurvey
  • sicoda_limesurvey's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 9 months ago #202577 by sicoda_limesurvey
Replied by sicoda_limesurvey on topic clearall and restart single click
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.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 9 months ago #202584 by DenisChenu
Replied by DenisChenu on topic clearall and restart single click
Code:
<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.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose