Willkommen, Gast
Benutzername: Passwort: Angemeldet bleiben:

THEMA: How to change button text?

How to change button text? 1 Jahr 3 Wochen her #98641

  • nichoe88
  • nichoe88s Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 2
  • Karma: 0
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
Der Administrator hat öffentliche Schreibrechte deaktiviert.

How to change button text? 1 Jahr 3 Wochen her #98687

  • tpartner
  • tpartners Avatar
  • OFFLINE
  • LimeSurvey Team
  • Beiträge: 4119
  • Dank erhalten: 760
  • Karma: 346
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:
$(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.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
Der Administrator hat öffentliche Schreibrechte deaktiviert.
Folgende Benutzer bedankten sich: nichoe88

How to change button text? 8 Monate 20 Stunden her #102777

  • dweisser
  • dweissers Avatar
  • OFFLINE
  • Bronze Donor
  • Beiträge: 203
  • Dank erhalten: 5
  • Karma: 5
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);
});
Der Administrator hat öffentliche Schreibrechte deaktiviert.

How to change button text? 8 Monate 19 Stunden her #102780

  • tpartner
  • tpartners Avatar
  • OFFLINE
  • LimeSurvey Team
  • Beiträge: 4119
  • Dank erhalten: 760
  • Karma: 346
Assuming you are using LS 2.0 and have not disabled the jQuery UI buttons, try this:

$(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.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
Der Administrator hat öffentliche Schreibrechte deaktiviert.

How to change button text? 8 Monate 19 Stunden her #102784

  • dweisser
  • dweissers Avatar
  • OFFLINE
  • Bronze Donor
  • Beiträge: 203
  • Dank erhalten: 5
  • Karma: 5
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...
Der Administrator hat öffentliche Schreibrechte deaktiviert.

How to change button text? 8 Monate 19 Stunden her #102785

  • tpartner
  • tpartners Avatar
  • OFFLINE
  • LimeSurvey Team
  • Beiträge: 4119
  • Dank erhalten: 760
  • Karma: 346
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.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
Der Administrator hat öffentliche Schreibrechte deaktiviert.

How to change button text? 8 Monate 19 Stunden her #102787

  • dweisser
  • dweissers Avatar
  • OFFLINE
  • Bronze Donor
  • Beiträge: 203
  • Dank erhalten: 5
  • Karma: 5
Der Administrator hat öffentliche Schreibrechte deaktiviert.

How to change button text? 8 Monate 18 Stunden her #102789

  • tpartner
  • tpartners Avatar
  • OFFLINE
  • LimeSurvey Team
  • Beiträge: 4119
  • Dank erhalten: 760
  • Karma: 346
You have a JavaScript error on line 65 of template.js preventing any subsequent script from running.

Capture_2013-12-22.PNG



.
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
Der Administrator hat öffentliche Schreibrechte deaktiviert.

How to change button text? 8 Monate 18 Stunden her #102790

  • dweisser
  • dweissers Avatar
  • OFFLINE
  • Bronze Donor
  • Beiträge: 203
  • Dank erhalten: 5
  • Karma: 5
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.
Letzte Änderung: 8 Monate 18 Stunden her von dweisser.
Der Administrator hat öffentliche Schreibrechte deaktiviert.
Moderatoren: ITEd
Ladezeit der Seite: 0.153 Sekunden
Donation Image