- Posts: 1
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
How to change button text?
- nichoe88
- Topic Author
- Offline
- New Member
Less
More
10 years 7 months ago #98641
by nichoe88
How to change button text? was created by nichoe88
Hello,
On my question page, one of the navigation buttons has the text "Exit and clear survey"
How do I change this text? I imagine that I can find the css for styling it (I haven't really looked yet), but I really want to change the text. I've looked at a few template.js files but can't find what I need.
thanks
On my question page, one of the navigation buttons has the text "Exit and clear survey"
How do I change this text? I imagine that I can find the css for styling it (I haven't really looked yet), but I really want to change the text. I've looked at a few template.js files but can't find what I need.
thanks
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10632
- Thank you received: 3697
10 years 7 months ago #98687
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic How to change button text?
Two options:
1) Customize the translation - manual.limesurvey.org/How_to_translate_L...existing_translation
2) Add something like this to the end of template.js:
1) Customize the translation - manual.limesurvey.org/How_to_translate_L...existing_translation
2) Add something like this to the end of template.js:
Code:
$(document).ready(function(){ var clearallText = 'Some new button text'; $('input.clearall').attr('value', clearallText); });
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: nichoe88
The topic has been locked.
- dweisser
- Offline
- Premium Member
Less
More
- Posts: 153
- Thank you received: 5
10 years 3 months ago #102777
by dweisser
Replied by dweisser on topic How to change button text?
Hey T -
why doesn't this work to change the Previous button's text?
$(document).ready(function()
{
var clearallText = 'Some new button text';
$('#moveprevbtn').attr('value',clearallText);
});
why doesn't this work to change the Previous button's text?
$(document).ready(function()
{
var clearallText = 'Some new button text';
$('#moveprevbtn').attr('value',clearallText);
});
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10632
- Thank you received: 3697
10 years 3 months ago #102780
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic How to change button text?
Assuming you are using LS 2.0 and have not disabled the jQuery UI buttons, try this:
Code:
$(document).ready(function(){ var previousText = 'Some new button text'; $('#moveprevbtn .ui-button-text').text(previousText); });
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- dweisser
- Offline
- Premium Member
Less
More
- Posts: 153
- Thank you received: 5
10 years 3 months ago #102784
by dweisser
Replied by dweisser on topic How to change button text?
I am in 2.0+ and have not disabled the jQuery UI buttons, but perhaps my there is somethign in my template preventing this from working. I'm using a clear_logo clone with no additional js scripting.
I used this similar post as well to no avail...
I used this similar post as well to no avail...
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10632
- Thank you received: 3697
10 years 3 months ago #102785
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic How to change button text?
Can you activate a test survey?
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- dweisser
- Offline
- Premium Member
Less
More
- Posts: 153
- Thank you received: 5
10 years 3 months ago #102787
by dweisser
Replied by dweisser on topic How to change button text?
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10632
- Thank you received: 3697
10 years 3 months ago #102789
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic How to change button text?
You have a JavaScript error on line 65 of template.js preventing any subsequent script from running.
.
.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Attachments:
The topic has been locked.
- dweisser
- Offline
- Premium Member
Less
More
- Posts: 153
- Thank you received: 5
10 years 3 months ago - 10 years 3 months ago #102790
by dweisser
Replied by dweisser on topic How to change button text?
Hmm...
That is in the dead center of the Function Correct PNG. I haven't touched it. Surely the template doesn't ship with an error in the JS.
I commented the function out...and now all works perfectly.
Thank you again.
That is in the dead center of the Function Correct PNG. I haven't touched it. Surely the template doesn't ship with an error in the JS.
I commented the function out...and now all works perfectly.
Thank you again.
Last edit: 10 years 3 months ago by dweisser.
The topic has been locked.
- egrange
- Offline
- New Member
Less
More
- Posts: 2
- Thank you received: 0
6 years 1 month ago #164038
by egrange
Replied by egrange on topic How to change button text?
Is there any update to this in 3.1 or higher?
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10632
- Thank you received: 3697
6 years 1 month ago #164064
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic How to change button text?
Update to what? There are several questions in this 4-year-old thread.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: holch
The topic has been locked.