Re: Rubbish in form fields

This WebDNA talk-list message is from

2004


It keeps the original formatting.
numero = 57321
interpreted = N
texte = >> I'm building a system that has to perform calculations on inputted=20 >> data, hence it's very important that users aren't allowed to enter=20 >> any old thing into the form fields. >> Was wondering if anyone had a rock-steady way of checking this - for=20= >> instance a multiple criteria [showif] tag or something? >> [showif [UserData]^,./@=A3$%*] >> [text]Form=3DError[/text] >> [/showif] >> Thanks, >> Pat > > Hi Pat, The statement above will not work because it will try to find=20= > that entire > comparison in your "userdata" variable. > > An if then statement would work however. > > [if ("[userData]" ^ ",") | ("[userData]" ^ ",") |...] > [then] > [math show=3Df]check=3D0[/check][!]invalid [/!] > [/then] > [else] > [math show=3Df]check=3D1[/check][!]move on [/!] > [else] > [/if] > > That kind of thing. > > the "|" means "or". [showif [Grep search=3D[^0-9]&replace=3Derror][UserData][/Grep]^error] [text]Form=3DError[/text] [/showif] Paul ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Rubbish in form fields ( Paul Willis 2004)
  2. Re: Rubbish in form fields ( Donovan Brooke 2004)
  3. Re: Rubbish in form fields ( Joe D'Andrea 2004)
  4. Rubbish in form fields ( Pat Holliday 2004)
>> I'm building a system that has to perform calculations on inputted=20 >> data, hence it's very important that users aren't allowed to enter=20 >> any old thing into the form fields. >> Was wondering if anyone had a rock-steady way of checking this - for=20= >> instance a multiple criteria [showif] tag or something? >> [showif [UserData]^,./@=A3$%*] >> [text]Form=3DError[/text] >> [/showif] >> Thanks, >> Pat > > Hi Pat, The statement above will not work because it will try to find=20= > that entire > comparison in your "userdata" variable. > > An if then statement would work however. > > [if ("[userData]" ^ ",") | ("[userData]" ^ ",") |...] > [then] > [math show=3Df]check=3D0[/check][!]invalid [/!] > [/then] > [else] > [math show=3Df]check=3D1[/check][!]move on [/!] > [else] > [/if] > > That kind of thing. > > the "|" means "or". [showif [Grep search=3D[^0-9]&replace=3Derror][UserData][/Grep]^error] [text]Form=3DError[/text] [/showif] Paul ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Paul Willis

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Country & Ship-to address & other fields ? (1997) Time to opensource? was [SMSI] WebDNA is too good to (2006) Search/sort in URL Was: GuestBook example (1997) Calendar (1997) WebCatalog2 Feature Feedback (1996) WebCatalog-NT?'s (1996) File Format Validation (2005) RAM variables (1997) NumFound (1999) Using [setlineitems] after a purchase command ... (1997) Database Connectivity (1999) WebCatalog Technical Reference (1997) Feedback on new features (2000) [WebDNA] Is [math] on a number with too many digits the only way that I can get scientific notation out of webdna? (2011) Why are some admin pages not encrypted? (2000) Spawning Holdup? (2000) Show Databases in admin (2000) Forms Search Questions (1997) searching twice on same field (1998) Fulfillment e-mail? (1998)