Hide "This Question is mandatory" after start typing

Mehr
1 Woche 6 Tage her #184169 von cmnxyz
COM_KUNENA_MESSAGE_CREATED_NEW
Hey Guys,


i have the following Problem: I have a mandatory free text question. When I dont answer the free text and wanna continue to next page the standard message is displayed: "This question needs to be answered." So far, so good.


When i begin to answer the question the message "This question needs to be answered." is still displayed, which might distract users. So i want to hide this message as soon as users start to type.

Is there any chance to do this on runtime?

Thank you! :)

Anhang:

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

LimeSurvey Partners
Mehr
1 Woche 5 Tage her #184222 von tpartner
COM_KUNENA_MESSAGE_REPLIED_NEW
Disable AJAX mode in the survey theme options and add this script to the question source:

<script type="text/javascript" charset="utf-8">
 
	$(document).on('ready pjax:scriptcomplete',function(){
 
		// Listener on the input
		$('#question{QID} input:text').on('keyup change', function(e) {
			if($.trim($(this).val()) != '') {
				$('#question{QID} .ls-question-mandatory.text-danger').hide();
			}
		});
 
	});
</script>

Sample survey attached:

Dateianhang:

Dateiname: limesurvey...3312.lss
Dateigröße:13 KB

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com
Anhang:
Folgende Benutzer bedankten sich: cdorin

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Jetzt loslegen!

Melden Sie sich jetzt an, und erstellen Sie in wenigen Minuten Ihre erste Umfrage.

Account einrichten

Abonnieren Sie unseren Newsletter

Abonnieren Sie unseren Newsletter für alle Neuigkeiten rund um LimeSurvey
captcha