- Posts: 6
- Thank you received: 0
- Forum
- English support forums
- Can I do this with LimeSurvey?
- How do I change the page requesting a token for authentication? (copied)
How do I change the page requesting a token for authentication? (copied)
- eschneider
-
Topic Author
- Offline
- Fresh Lemon
-
Thanks
I copied this from the Installation category once I saw where it went. Sorry for duplication. This was my first post - I'll know better next time.
Please Log in or Create an account to join the conversation.
As for the layout, have a look at the template editor, there is a sub-file for the registration screen if I remember correctly.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"
Please Log in or Create an account to join the conversation.
- eschneider
-
Topic Author
- Offline
- Fresh Lemon
-
- Posts: 6
- Thank you received: 0
Thanks for your reply. However I am not trying to translate the text on the page, I am trying to replace it so it matches an existing survey which combines their own English text with a field to supply the "Token" which is identified in a mail letter as the "Online Survey Identifier" and assures the recipient much like a privacy statement. I also looked at the register page and believe that the text I am trying to replace is not part of the register page. The "page" I am trying to locate has the following text -
This is a controlled survey. You need a valid token to participate.
If you have been issued a token, please enter it in the box below and click continue.
If translation is the only way to accomplish this I will look further into it. On the face of it translation does not seem appropriate.
Please Log in or Create an account to join the conversation.
- DenisChenu
-
- Offline
- LimeSurvey Community Team
-
- Posts: 8878
- Karma: 400
- Thank you received: 1469
Hello,eschneider wrote: If translation is the only way to accomplish this I will look further into it. On the face of it translation does not seem appropriate.
You can do it in javascript, in template.js, you can do something like that:
$(document).ready(function(){
if (typeof tokenlabel === "undefined"){
tokenlabel ="YOUR TOKEN LABEL : ";
}
if (typeof tokentext === "undefined"){
tokentext ="YOUR TOKEN TEXT DESCRIPTION";
}
if (typeof tokenerror === "undefined"){
tokenerror ="<br><br><strong class='error'>YOUR ERROR MESSAGE.</strong>";
}
if ($("#tokenform").length )
{
$("#tokenmessage").html(tokentext);
$("label[for='token']").text(tokenlabel);
}
else
{
$("#tokenmessage").html(tokentext+tokenerror);
}
});
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .
Please Log in or Create an account to join the conversation.
- eschneider
-
Topic Author
- Offline
- Fresh Lemon
-
- Posts: 6
- Thank you received: 0
Your reply was very helpful and addresses several of the issues we expected we would have to deal with to fully handle the token field.
What we also want to do is replace the text on the page in general. By experimenting we've been able to modify the text on the "Register" page but the page I'm calling the "authentication" page is not impacted by those modifications. That leads us to believe it is another page/place we would need to modify. Can you point us to it as we have been unable to find it?
Thanks
Please Log in or Create an account to join the conversation.
- DenisChenu
-
- Offline
- LimeSurvey Community Team
-
- Posts: 8878
- Karma: 400
- Thank you received: 1469
I don't have a look at register HTML,
But something like
$('.register-message-1').html('The first line, bold in default template');
$('.register-message-2').html('The second line, use <br /> for line feed');
$('table.register td:nth-child(1)'.html('firstname replace');
$('table.register td:nth-child(3)'.html('survame replace');
$('table.register td:nth-child(5)'.html('mail adress replace');
But this page is awful

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .
Please Log in or Create an account to join the conversation.
- eschneider
-
Topic Author
- Offline
- Fresh Lemon
-
- Posts: 6
- Thank you received: 0
I agree the register page is awful. Unfortunately it appears even before the Welcome page and thus its awfulness can depress survey response just at the point when a respondent is deciding whether they really do want to respond.
The main thing we would like to do is change the verbiage on the entire page, not just the label(s) for the token. If I could force the Welcome page to appear before the register page I would not need to change very much on the register page. Failing that I would like to change the text on the register page which would make the Welcome page unnecessary. I hope that makes what are trying to do clearer.
Thanks
Ed
Please Log in or Create an account to join the conversation.
e.g:
and embed it in any basic html webpage...<form method='post' action=' yourplatform.com/register.php '>
<table class='register' summary='Registrationform'>
<tr>
<td align='right'><input type='hidden' name='sid' value='1234' id='sid' /></td>
<!-- 1234 = your survey ID -->
<td align='left'><input class='text' type='hidden' name='register_firstname' value=' ' /></td>
</tr>
<tr>
<td align='left'><input class='text' type='hidden' name='register_lastname' value=' '/></td>
</tr>....
Remember that you can copy, rename and adapt the register.php file in case of needed to get a custom filte to work on it:
<form method='post' action=' yourplatform.com/register_custom.php '>
Ben/
Benoît
EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
Please Log in or Create an account to join the conversation.
- eschneider
-
Topic Author
- Offline
- Fresh Lemon
-
- Posts: 6
- Thank you received: 0
Your solution appears to focus on the register page. What I'm actually trying to modify does not seem to be the register page as far as we can tell. I've called it the "authentication" page to try and distinguish it from the register page. The source which this "page" appears to generate is copied following. What generates this and how/where can I alter it (the text parts)? Thanks
<div id="wrapper"><p id="tokenmessage">This is a controlled survey. You need a valid token to participate.<br />If you have been issued a token, please enter it in the box below and click continue.</p>
<script type='text/javascript'>var focus_element='#token';</script>
<form id='tokenform' method='get' action=' npope-1718.altarum.pri/limesurvey/index.php '>
<ul>
<li>
<label for='token'>Token</label><input class='text ' id='token' type='text' name='token' /><input type='hidden' name='sid' value='91157' id='sid' />
<input type='hidden' name='lang' value='en' id='lang' /> <input type='hidden' name='newtest' value='Y' id='newtest' /></li><li>
<input class='submit' type='submit' value='Continue' />
</li>
</ul>
</form></div> </td>
</tr>
</table>
</div>
Please Log in or Create an account to join the conversation.
- DenisChenu
-
- Offline
- LimeSurvey Community Team
-
- Posts: 8878
- Karma: 400
- Thank you received: 1469
Look at index.php

Denis
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .
Please Log in or Create an account to join the conversation.
Unfortunately I do not fully understand the suggestions that have already been made.
@eschneider: Are you still reading here? How did you solve your problem?
@everyone: How can I change the text that is shown on the same page as the token-insert field?
@DenisChenu: Where can I find index.php?
Thank you very much in advance!
Please Log in or Create an account to join the conversation.
- DenisChenu
-
- Offline
- LimeSurvey Community Team
-
- Posts: 8878
- Karma: 400
- Thank you received: 1469
Updating PHP file need PHP "competence". And actually it's application/controllers/RegisterController.php

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .
Please Log in or Create an account to join the conversation.
- eschneider
-
Topic Author
- Offline
- Fresh Lemon
-
- Posts: 6
- Thank you received: 0
We would have preferred changing the text in Lime but we wanted to avoid changing our local version of Lime.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.