Check out the LimeSurvey source code on GitHub!

Have caption for the Drop down field type.

More
5 years 6 months ago #63957 by chetanmadaan
write now the drop field is like.


can we have it like:


Thanks

Please Log in to join the conversation.

More
5 years 6 months ago - 5 years 6 months ago #63979 by tpartner
I don't think there's an easy way to do it with CSS but you could use JavaScript to insert the Help text of the question before the dropdown element.

Note: This example is for the default template.

1) Set up your survey to use JavaScript .

2) Add the text you would like to the "Help" field of the question.

3) Add the following script to the source of the question. Replace "QQ" with the question ID .

The script moves the help text to before the dropdown element and then hides the help container.
<script type="text/javascript" charset="utf-8">
 
	$(document).ready(function() {
 
		insertText(QQ);
 
		function insertText(qID) {
			var text = $('#question'+qID+' .survey-question-help').text();
			$('<span>'+text+'</span>').insertBefore('#question'+qID+' select');
			$('#question'+qID+' .survey-question-help').hide();
		}
 
	});
 
</script>

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last Edit: 5 years 6 months ago by tpartner.

Please Log in to join the conversation.

More
5 years 6 months ago #63996 by chetanmadaan
Thanks again - i think this might be helpful.

thanks

Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form