Welcome to the LimeSurvey Community Forum

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

Convert Token to UPPERCASE

  • Mike1985
  • Mike1985's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
11 years 1 month ago #91619 by Mike1985
Convert Token to UPPERCASE was created by Mike1985
I think I am having a problem. When my customer comes to fill in a survey they are sometimes entering their token in lowercase letters but the token in the database is uppercase letters.

This is having unpredictable results. Some are being kicked out of the survey. Unable to recognize their session and continue with the survey.

Where on my index.php script do I have to change the SQL so that the token they entered is being converted to UPPERCASE??

I am on version 1.90+

Thank you
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
11 years 1 month ago #91634 by tpartner
Replied by tpartner on topic Convert Token to UPPERCASE
Dunno about modifying the PHP but you could convert to uppercase with JavaScript.

Add the following to the end of template.js:
Code:
$(document).ready(function(){
  $('input#token').change(function(){
    $(this).val($(this).val().toUpperCase());
  });
});

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose