How to change the button text from submit to next or any others?

Plus d'informations
il y a 2 mois 1 semaine #181447 par mrli999
COM_KUNENA_MESSAGE_CREATED_NEW
I would like to change the button text from submit to next. I searched the forum and finded the following resolution:

$(document).ready(function(){
var submitText = 'Next';
$('#movesubmitbtn .ui-button-text').text(submitText);
});

I copied the above script to the template.js file, and put it at the end of this file. But doesn't work.


I inspected my survey the find the name of submit button is:
<button type="submit" id="movesubmitbtn" value="movesubmit" name="movesubmit" accesskey="l" class="submit button btn btn-lg btn-primary"> Submit </button>

And my limesurvey version is 2.65.3+170607.

If I would like to change the text for the submit button. What should I do? thanks.

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

LimeSurvey Partners
Plus d'informations
il y a 2 mois 1 semaine #181454 par Joffm
COM_KUNENA_MESSAGE_REPLIED_NEW
Hi,
only:

$(document).ready(function(){
var submitText = 'My new submit';
$('#movesubmitbtn').text(submitText);
});


Joffm

Tested in Version 2.73.1+171220


Volunteers are not paid.
Not because they are worthless, but because they are priceless
Pièces jointes :
Les utilisateur(s) suivant ont remercié: mrli999

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

Plus d'informations
il y a 2 mois 1 semaine #181461 par mrli999
COM_KUNENA_MESSAGE_REPLIED_NEW
I copied your script into the template.js file. But doesn't work. The button text is still not changed. Thanks.

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

Plus d'informations
il y a 2 mois 1 semaine - il y a 2 mois 1 semaine #181465 par Joffm
COM_KUNENA_MESSAGE_REPLIED_NEW
I entered it in the question text

and it works in template.js as well.

Joffm


Volunteers are not paid.
Not because they are worthless, but because they are priceless
Pièces jointes :
Last edit: il y a 2 mois 1 semaine by Joffm.
Les utilisateur(s) suivant ont remercié: mrli999, cdorin

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

Plus d'informations
il y a 2 mois 1 semaine #181480 par mrli999
COM_KUNENA_MESSAGE_REPLIED_NEW
This time it works, thanks.

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

Plus d'informations
il y a 1 mois 2 semaines #182781 par remhk
COM_KUNENA_MESSAGE_REPLIED_NEW
I wasn't able to implement this for version Version 2.62.2+170203. Can this be implemented with only "3 and higher versions?

Thanks

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

Plus d'informations
il y a 1 mois 2 semaines #182789 par tpartner
COM_KUNENA_MESSAGE_REPLIED_NEW
The script above should work in 2.x versions.

This will work in 3.x versions:

<script type="text/javascript" charset="utf-8">
 
	$(document).on('ready pjax:scriptcomplete',function(){
		var submitText = 'My new submit';
		$('#ls-button-submit[value="movesubmit"]').text(submitText);	
	});
</script>

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com

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

Plus d'informations
il y a 1 mois 2 semaines #182799 par remhk
COM_KUNENA_MESSAGE_REPLIED_NEW
I tried the following and it is not working:(. Where do we need to put it? I have currently placed it in the "source" of the question where the "Submit" button needs to appear.

$(document).ready(function(){
var submitText = 'Next';
$('#movesubmitbtn .ui-button-text').text(submitText);
});

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

Plus d'informations
il y a 1 mois 2 semaines #182801 par tpartner
COM_KUNENA_MESSAGE_REPLIED_NEW
What LimeSurvey version?

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com

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

Plus d'informations
il y a 1 mois 2 semaines #182802 par remhk
COM_KUNENA_MESSAGE_REPLIED_NEW
Version 2.62.2+170203

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

Plus d'informations
il y a 1 mois 2 semaines #182803 par tpartner
COM_KUNENA_MESSAGE_REPLIED_NEW
This should work in that version. If not, activate a sample survey and give a link here so we can see the source.

<script type="text/javascript" charset="utf-8">
	$(document).ready(function(){
		var submitText = 'My new submit';
		$('#movesubmitbtn').text(submitText);
	});
</script>

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com

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

Plus d'informations
il y a 1 mois 2 semaines #182856 par remhk
COM_KUNENA_MESSAGE_REPLIED_NEW
This one worked.. Thank you!

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

Plus d'informations
il y a 1 mois 1 semaine #183221 par tpartner
COM_KUNENA_MESSAGE_REPLIED_NEW
@Nina265, to avoid confusion, please always state which LimeSurvey version your script is for.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com

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

Plus d'informations
il y a 1 mois 6 jours #183297 par DenisChenu
COM_KUNENA_MESSAGE_REPLIED_NEW

tpartner écrit: @Nina265, to avoid confusion, please always state which LimeSurvey version your script is for.

Since Nina put some spam link, all post deleted …

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand .
An error happen ? Before make a new topic : remind the Debug mode .

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!