Restricting to enable choosing only one radio button from a few questions toget

More
4 years 6 months ago #87195 by dvey
dvey created the topic: Restricting to enable choosing only one radio button from a few questions toget
Hi,

In the survey i need to have 3 radio button list questions.

How can i do that user will be able to choose only one radio button-

From the questions all together?

Explanation:

Each user can choose a total of ONE radio button in the whole survey.

Thanks.
:P

Please Log in to join the conversation.

More
4 years 6 months ago #87222 by tpartner
tpartner replied the topic: Restricting to enable choosing only one radio button from a few questions toget
Assuming all radio questions are on the same page and there are no other radio questions on that page that you don't want included...

1) Set up your survey to use JavaScript .

2) Add the following script to the source of one of the questions.

The script only allows one radio button on the page to be selected.
<script type="text/javascript" charset="utf-8">
 
	$(document).ready(function() {
		$('input.radio').click(function(){
			$('input.radio').attr('checked', false);
			$(this).attr('checked', true);
		});
	});
 
</script>

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
4 years 6 months ago #87223 by dvey
dvey replied the topic: Restricting to enable choosing only one radio button from a few questions toget
WOW
amaizing!
finally it works!!
thank you very much
:)

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.