Welcome to the LimeSurvey Community Forum

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

Button to exit anywhere but save answers

More
5 years 1 week ago #204745 by Jenncr93
Hello all,

I am setting up a LS filled with branching, piping, cascading, tailoring, etc. After having set up everything, I now want to include a button for the person to be able to exit the survey whenever they want but still save their answers (willingly) and that the survey appears as completed on my end (i.e. like a button next to "exit the survey and clear answers" on the top of the screen, or something like that).

This survey could touch upon a "sensitive" topic for some so I really want to give them all of the options so they feel comfortable. I am good with Javascript (i.e. copy-pasting it into the source not actually understanding it) so if you have any suggestions on how to do this (if it is possible) please send it my way.

THANK YOU!!!

Ps. I haven't found any other posts exactly on what I want to do, but if I missed it, please send it my way as well :)
The topic has been locked.
More
5 years 1 week ago #204765 by DenisChenu
Maybe (unsure)

1. Activate full index
2. Create a submit button with step at 1000 :
like this
Code:
<button type="submit" name="move" value="1000" class="btn btn-primary">Submit</button>
Warning : validation still done, if there are a mandatory question : it can not be submitted.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
The topic has been locked.
More
5 years 1 day ago #205091 by Jenncr93
Thank you very much for your reply Denis. I took a while to respond because I don't have access to the template so I have to ask the admin to do it.

When the admin added it to the survey template, the button did not appear on the top of the survey (did not appear at all). However, when I added it to the help portion of a question, it appeared and seems to work! Any thought on how to solve this? Where exactly should the code go in the template?

Thank you so much!!
The topic has been locked.
More
5 years 1 day ago #205094 by Joffm
Hi,
I put it in the "nav_bar.twig" right under the "clearall_links" without any further styling.




Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
More
5 years 1 day ago #205097 by Jenncr93
Great, thank you so much Joffm. That seems like it should do it. I sent it to the admin and will wait for his reply. I will let you know.

Thank you immensely!!
The topic has been locked.
More
5 years 1 day ago #205116 by Jenncr93
Hi Joffm, the admin was not sure where to put the code since it seems to be a little bit different. He sent me the template, and I do not see either where to put it. It seems the code from your template is different. I am attaching it here so you can take a look and tell me where you think it should go. Thank you so much!!
The topic has been locked.
More
5 years 1 day ago #205118 by holch
he send you JS file as template???

Time to change the admin. ;-)

As Joffm said, you need to make the modifications in "nav_bar.twig"

Help us to help you!
  • Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
  • Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.
The following user(s) said Thank You: DenisChenu
The topic has been locked.
More
5 years 7 hours ago #205159 by Jenncr93
Thank you very much for your reply Holch. The admin says those are all of the files he found... So I can't really do much else in that regard. Just a clarification, we have LimeSurvey version 2 (institutional license, that is why I have to go through an admin). The references that I found for nav_bar.twig are for version 3 ( www.limesurvey.org/manual/New_Template_System_in_LS3.x )... is this maybe the problem? If so, would it still be possible to implement the code in version 2? where would it go?

Thank you so much!!
The topic has been locked.
More
5 years 6 hours ago #205161 by DenisChenu

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
The topic has been locked.
More
5 years 5 hours ago - 5 years 5 hours ago #205162 by Joffm
Hi,
if version 2 means "one of the versions 2.00 - 2.06" you have to consider that these versions were "jquery-ui" based.
Here this class "btn btn-primary" is not existing.
Here you should use "navigator.pstpl".

Since version 2.50 LimeSurvey is "bootstrap"-based.
In one of the versions 2.50-2.73 you may use "startpage.pstpl".

Anyway, please provide the exact version (it is displayed in the footer of your GUI) and your used template.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 5 years 5 hours ago by Joffm.
The topic has been locked.
More
5 years 5 hours ago #205164 by Jenncr93
Hi Denis and Joffm,

Thank you so much for the follow-up. I appreciate it immensely.

The exact version is 2.63.1+170305. You can find the template zip attached with all of the files you mentioned.

Jennifer
The topic has been locked.
More
5 years 5 hours ago #205165 by DenisChenu
We don't work for your company ,

Then : ask to your IT team to make the update …

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
The topic has been locked.
More
5 years 4 hours ago #205168 by Jenncr93
Hi Denis,

Sorry if I offended you. I am a master's student and my institution is my university. The survey is for my Master's thesis, and I am just trying to make it as good as possible with the limited tools I have at my disposal since I feel it is a very important project in the community that could do a lot of help. I already went to the IT department, they are not that Limesurvey savvy to make the necessary changes by themselves, that's why I am here.

Since I am only a student and do not own the license, the IT department team are the only authorized admins. I only sent the file because Joffm asked me to provide it (at least that is why I understood). But I will for sure ask them to make the changes from the suggestions that you have already given me.
Sorry again, and thank you for your help!
The topic has been locked.
More
5 years 4 hours ago - 5 years 4 hours ago #205169 by Joffm
Hi,
to be honest, I have not the least idea why you'd like to have this option.
If somebody doesn't want to proceed, he either closes the browser (all given answers are saved unless you display your survey "all on one page")
or he selects the link "Exit and clear", where he expresses his will to have removed his given answers.

Well, you can hide this link that somebody can only leave a survey by closing the browser.
And you have to decide in your analysis if you use this responses or not.

Joffm

Anyway, as I said before you may use the startpage.pstpl to include this button.
Using your provided template you see this (with a little bit of css)
This is only the display.
I did not test if it works.



In my opinion each student who feels unhappy with the university's IT department should be able to license the basic version for one or two month (an investment in the future).
With the actual student discount this is really not too much.

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 5 years 4 hours ago by Joffm.
The topic has been locked.
More
5 years 3 hours ago #205170 by Joffm
And remove the <button> tag from the "template.css"

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose