Welcome to the LimeSurvey Community Forum

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

Display the "TOKEN" in token page

  • kevinleung
  • kevinleung's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
3 years 8 months ago #203655 by kevinleung
Display the "TOKEN" in token page was created by kevinleung
Hi All,

Is it possible to display the "TOKEN" in token page? (NOT showing "......")
Just like a normal text box.
I am using 2.6.4 version.
Thank you very much

Kevin
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 8 months ago - 3 years 8 months ago #203675 by tpartner
Replied by tpartner on topic Display the "TOKEN" in token page
Copy a core template and add this to the end of template.js:

Code:
$(document).ready(function() {
 
  if($('#tokenform #token').length > 0) {
    $('#token').after('<input class="'+$('#token').attr('class')+'" required="required" id="token" type="text" value="" name="token">');
    $('#token:first').remove();
  }
});

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 3 years 8 months ago by tpartner. Reason: Bug fix
The topic has been locked.
  • kevinleung
  • kevinleung's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
3 years 8 months ago #203722 by kevinleung
Replied by kevinleung on topic Display the "TOKEN" in token page
Hi tpartner,

Thank you for the help. But there are some issue...
It could display the number, but there are TOKEN box in everypage
So I have to type the token many times.....

Kevin
Attachments:
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 8 months ago #203744 by tpartner
Replied by tpartner on topic Display the "TOKEN" in token page
I have updated the code snippet.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • kevinleung
  • kevinleung's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
3 years 8 months ago #203963 by kevinleung
Replied by kevinleung on topic Display the "TOKEN" in token page
Hi tpartner, Thank you very much!! It works.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose