Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

change token request text

  • exlibris69
  • exlibris69's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 11 months ago #133880 by exlibris69
change token request text was created by exlibris69
Hi guys!

Could you please tell me is it possible to change default text for my own one in screen with token request? In which way? Screenshot is in attachement.

Thanks in advance.
Attachments:
The topic has been locked.
More
7 years 11 months ago #133881 by jelo
The topic has been locked.
  • exlibris69
  • exlibris69's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 11 months ago #133883 by exlibris69
Replied by exlibris69 on topic change token request text
I meant to use own text concrete in one survey, not to do the translation into another language.Thanks
The topic has been locked.
More
7 years 11 months ago #133885 by jelo
Replied by jelo on topic change token request text
Yes, I know. But that won't change my answer. Since Limesurvey fetches the text from these language file it makes no difference.
The Limesurvey developer are not into typical customizing or overriding of such default messages. I would also like to see overriding fields which would allow to customize messages per survey without such tweaking.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 11 months ago - 7 years 11 months ago #133893 by tpartner
Replied by tpartner on topic change token request text
A JavaScript solution - add the following to the end of template.js:

Code:
$(document).ready(function() {    
 
  // Define the new message
  var newMessage1 = 'This is the new text to appear on the token-entry screen.';
  var newMessage2 = 'This is the new text to appear on the token-fail screen.';
 
  // Insert the new message
  if($('#tokenmessage').length > 0) {
    if($('#tokenform').length > 0) {
      $('#tokenmessage').html(newMessage1);
    }
    else {
      $('#tokenmessage').html(newMessage2);
    }
  } 
});

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 7 years 11 months ago by tpartner.
The following user(s) said Thank You: exlibris69, mana
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose