Hide "This Question is mandatory" after start typing

Plus d'informations
il y a 1 semaine 6 jours #184169 par 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! :)

Pièces jointes :

Connexion ou Créer un compte pour participer à la conversation.

LimeSurvey Partners
Plus d'informations
il y a 1 semaine 5 jours #184222 par 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:

Fichier attaché :

Nom du fichier : limesurvey...3312.lss
Taille du ficher :13 ko

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com
Pièces jointes :
Les utilisateur(s) suivant ont remercié: cdorin

Connexion ou Créer un compte pour participer à la conversation.

Commencez dès maintenant !

Créez simplement un compte et commencez à utiliser LimeSurvey dès aujourd'hui.

Inscrivez-vous maintenant

Inscrivez-vous à notre Newsletter!