The LimeSurvey Fund-Raiser 2012 is complete. Thank you for donating a total of 25,000 USD!     List of donors »

Willkommen, Gast
Benutzername: Passwort: Angemeldet bleiben:
  • Seite:
  • 1

THEMA: Change token input type to "password"

Change token input type to "password" 6 Monate 4 Wochen her #87257

  • SGAMaddin
  • SGAMaddins Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 6
  • Dank erhalten: 1
  • Karma: 0
Hello,

how can I change the input type of the token-input-field?
Currently it is:
<label for='token'>Token:</label><input class='text ' id='token' type='text' name='token' />
and I want it to change it to be
<label for='token'>Token:</label><input class='text ' id='token' type='password' name='token' />
so that the letters aren´t. displayed while typing it.

Is it possibel to change this?
Letzte Änderung: 6 Monate 4 Wochen her von SGAMaddin.
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Re: Change token input type to "password" 6 Monate 3 Wochen her #87449

  • tpartner
  • tpartners Avatar
  • OFFLINE
  • LimeSurvey Team
  • Beiträge: 2858
  • Dank erhalten: 424
  • Karma: 244
Add this to the end of template.js:
$(document).ready(function() {
	if($('#tokenform')) {
		$('#token').after('<input type="password" name="token" id="token" class="text ">').remove();
	}
});
Cheers,
Tony

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

Aw: Re: Change token input type to "password" 6 Monate 3 Wochen her #87557

  • SGAMaddin
  • SGAMaddins Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 6
  • Dank erhalten: 1
  • Karma: 0
Thank you for your help but sadly your solution didn´t work out. I managed to create my own with some of your informations. I have this in head of my startpage.pstpl:
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
document.getElementById("token").type='password';
});
</script>

This worked out fine but at the survey page you get a problem: The input-field is displayed at the bottom of the survey.
So I added this code to the description of my first question:
$(document).ready(function() {
document.getElementById("token").style.display='none';});
Der Administrator hat öffentliche Schreibrechte deaktiviert.
  • Seite:
  • 1
Moderatoren: DenisChenu, ITEd
Ladezeit der Seite: 0.323 Sekunden
Donation Image