Allow Preview of Survey but not submitting

More
6 years 7 months ago #56741 by hcdmoore
hcdmoore created the topic: Allow Preview of Survey but not submitting
Is is possible to allow a survey that is setup to be anonymous and tokened to be previewed before allowing submitting.

To help flesh this out, we are considering using limesurvey as a tool for an election. Typically the voters have had a chance to review the ballot prior to submission.

Please Log in to join the conversation.

More
6 years 7 months ago #56742 by Mazi
Mazi replied the topic: Allow Preview of Survey but not submitting
Do you want to show a preview version to the people that doesn't record data and then lead them to the real survey after preview or do you want to show them their answers before they submit them?


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"

Please Log in to join the conversation.

More
6 years 7 months ago #56743 by hcdmoore
hcdmoore replied the topic: Allow Preview of Survey but not submitting
Thanks for the quick response!

Let me clarify. I do not mean a "review your choices" prior to submission screen. My question was muddy.

In limesurvey, there is the ability to set start and stop times and dates. Is it possible to have user access the survey - look at the questions(in this case ballot) prior to the start time, but when they are viewing it, there is not submission option (or at least some indication that it is not available yet, disabled, etc).

SO - all that - closer to your first response - "Do you want to show a preview version to the people that doesn't record data"

Please Log in to join the conversation.

More
6 years 7 months ago #56746 by holch
holch replied the topic: Allow Preview of Survey but not submitting
Have a look here:

docs.limesurvey.org/Global+settings&high...ion%20users#Security

"Survey preview only for administration users:" should be what you are looking for.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in to join the conversation.

More
6 years 7 months ago #56750 by tpartner
tpartner replied the topic: Allow Preview of Survey but not submitting
Or you could set up and activate the survey complete with tokens for the preview period with a disabled submit button.

Then, when it's time for the election, deactivate and reactivate the survey (this will remove all responses, if any, and reset the token table) and enable the submit button.

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
6 years 7 months ago #56752 by hcdmoore
hcdmoore replied the topic: Allow Preview of Survey but not submitting
Thanks for the responses.

What would be the best way to disable the submit button? (is this a setting that I have missed?)

The non-authenticated preview is a solution though it is a bit more "open" then I was hoping.

David

Please Log in to join the conversation.

More
6 years 7 months ago #56753 by tpartner
tpartner replied the topic: Allow Preview of Survey but not submitting
You would need to do it with JavaScript. Which version of LS are you using? I'll give you a snippet.

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
6 years 7 months ago #56754 by hcdmoore
hcdmoore replied the topic: Allow Preview of Survey but not submitting
Version 1.90+ Build 9642

Please Log in to join the conversation.

More
6 years 7 months ago #56755 by tpartner
tpartner replied the topic: Allow Preview of Survey but not submitting
Set up your survey to use JavaScript and place the following script in the source of a question on the last page to disable the button:
<script type="text/javascript" charset="utf-8">
 
	$(document).ready(function(){
 
		$('.submit:eq(1)').attr('disabled', true);		
 
	})
 
</script>

Or this to hide it:
<script type="text/javascript" charset="utf-8">
 
	$(document).ready(function(){
 
		$('.submit:eq(1)').hide();		
 
	})
 
</script>

You may also consider replacing it with a button (just to give them somewhere to go) but we would need to know what you wanted to happen if that button was clicked.

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: hcdmoore

Please Log in to join the conversation.

More
6 years 7 months ago #56757 by hcdmoore
hcdmoore replied the topic: Allow Preview of Survey but not submitting
Thanks Tony,

I will look into this as a solution. Need to test this with the actual user who will be building the surveys.

Your JS gives me an idea on this.

Thanks,

Please Log in to join the conversation.

More
6 years 7 months ago #56765 by tpartner
tpartner replied the topic: Allow Preview of Survey but not submitting
Ah, in that case I think that in the last page of the survey you'll need to use {INSERTANS} and set a cookie with the results of the question. The cookie can then be retrieved in the end page and you can display messages accordingly.

There used to be a post describing this but I can't find it. Perhaps the forum cleaners are a little over active.

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
5 years 5 months ago #77481 by pksupport
pksupport replied the topic: Allow Preview of Survey but not submitting
Sorry - exactly where would you place this script. In the template, but what page? I can access the actual install on the server directly. I want to hide the submit button for one survey and instead present a URL to take another survey. i can do this with a boilerplate but I don't want a submit button. Thanks.

Please Log in to join the conversation.

More
5 years 5 months ago #77484 by tpartner
tpartner replied the topic: Allow Preview of Survey but not submitting
You can place it in the source of a question or the group description.

See setting up your survey to use JavaScript .

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now