Quantcast
Viewing all articles
Browse latest Browse all 17529

Radio button and textbox combined in one question - by: tpartner

1) Set up your survey to use JavaScript.

2) Add the following script to the source of the question. The script will hide The "Other" radio and label and move the text input to the top of the list.
<script type="text/javascript" charset="utf-8">
	$(document).ready(function(){
 
		// Identify this question
		var q1ID = '{QID}';
		var q1 = $('#question'+q1ID+'');
 
		// Hide the "Other" radio button and label
		$('.other-item input.radio, .other-item .answertext', q1).hide();
 
		// Move the "Other" row to the top
		$('.radio-list', q1).prepend($('.other-item', q1));
	});
</script>

Viewing all articles
Browse latest Browse all 17529

Trending Articles