Check out the LimeSurvey source code on GitHub!
Welcome, Guest
Username: Password:

TOPIC: Hiding 'Next' button if consent not given

Hiding 'Next' button if consent not given 2 years 8 months ago #104780

  • voadicia
  • voadicia's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 2
  • Karma: 0
Sorry if this question's already been answered, but I couldn't find it through searching.

I don't have a registration page in my survey because I don't need users to register, but I still want them to confirm that they've read the participant information sheet. I have therefore been trying to put yes/no checkboxes on the welcome page before participants are able to enter the survey.

I used the code from the workaround for the registration page, which obviously inserts the checkboxes with no problem (

I also found in the forums someone has previously answered how to hide the 'Next' button

<script type="text/javascript" charset="utf-8">

$(document).ready(function() {




which, again, obviously does hide the 'Next' button, the problem is that I don't know how to make the first thing affect the second thing--how do I get the 'Next' button to be hidden only until 'Yes' is checked?
The administrator has disabled public write access.

Hiding 'Next' button if consent not given 2 years 8 months ago #104784

  • Ben_V
  • Ben_V's Avatar
  • Offline
  • Platinum Lime
  • Posts: 1842
  • Thank you received: 455
  • Karma: 116
For a YES/NO question,
try the following code:
<script type="text/javascript">
	$(document).ready(function() {
		// Initially disable the Next/Submit button
		// Listeners on Yes/No radios to toggle the Next/Submit button
                   alert('please agree or leave')

1) Remove or edit the prompted alert if unnecesary...
2) If your html element is not a "button" but an "input", look this previous post


EM Variables => | EM Roadmap =>
All LS releases => | 2.06lts =>
Demo surveys => (already included in /docs/demosurveys)
Last Edit: 2 years 8 months ago by Ben_V.
The administrator has disabled public write access.
Time to create page: 0.610 seconds
Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form