Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Controlling User Input

Status
Not open for further replies.

Swamijones

Technical User
Jun 21, 2000
11
US
Is there any way to force a user entered variable (through a text field) to not be case sensitive for a conditional statement? [sig]<p>Swamijones<br><a href=mailto:Swamijones@intoxic.com>Swamijones@intoxic.com</a><br><a href= Media</a><br> [/sig]
 
You can force the input to be all lowercase even if the user enters Uppercase letters. They won't even notice but it will make your life easier when you use variables. Here is how: You create the &quot;Submit BUTTON&quot; or whatever that pulls the read variable action. The text field where the user enters the information is called &quot;input&quot; in this example. What you get is called final and that is the variable that you manipulate instead of input. Add this code to your instance:

On (Release)
Set Variable: &quot;c&quot; = &quot;1&quot;
Set Variable: &quot;final&quot; = &quot;&quot;
Loop While (c<=Length (input))
Set Variable: &quot;temp&quot; = Substring (input,c,1)
Set Variable: &quot;temp&quot; = Ord (temp)
If ((temp>64) and (temp<91))
Set Variable: &quot;temp&quot; = temp+32
End If
Set Variable: &quot;temp&quot; = Chr (temp)
Set Variable: &quot;c&quot; = c+1
Set Variable: &quot;final&quot; = final & temp
End Loop
End On

It just reads the ascii number and if its is an upper case, it changes it to the lowercase

Adios

Ferhelping.
[sig]<p>Fernando Regueiro<br><a href=mailto:ferhelping@yahoo.com>ferhelping@yahoo.com</a><br><a href= > </a><br> [/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top