Re: stripping extra spaces from form fields

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 35611
interpreted = N
texte = >Is there a simple way to strip extra spaces from form fields before >they are appended to a database? What do you mean by simple? This will remove up to 10 spaces from the beginning and/or the end of the formValue, but I don't know if you consider this code to be simple enough for you:[text]newFormValue=[formValue][/text][loop start=1&end=10][showif [getchars start=1&end=1][newFormValue][/getchars]= ] [text]newFormValue=[getchars start=2][newFormValue][/getchars][/text] [/showif][showif [getchars start=1&end=1&from=end][newFormValue][/getchars]= ] [text]newFormValue=[getchars start=2&from=end][newFormValue][/getchars][/text] [/showif][/loop][append db=xxx.db]someField=[url][newFormValue][/url][/append] ================================ Kenneth Grome, WebDNA Consultant 808-737-6499 http://webdna.net ================================------------------------------------------------------------- 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://search.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: stripping extra spaces from form fields (John Butler 2000)
  2. Re: stripping extra spaces from form fields (TWFT Mail 2000)
  3. Re: stripping extra spaces from form fields (John Butler 2000)
  4. Re: stripping extra spaces from form fields (TWFT Mail 2000)
  5. Re: stripping extra spaces from form fields (WebDNA Support 2000)
  6. Re: stripping extra spaces from form fields (Kenneth Grome 2000)
  7. stripping extra spaces from form fields (Marc Thompson 2000)
>Is there a simple way to strip extra spaces from form fields before >they are appended to a database? What do you mean by simple? This will remove up to 10 spaces from the beginning and/or the end of the formValue, but I don't know if you consider this code to be simple enough for you:[text]newFormValue=[formValue][/text][loop start=1&end=10][showif [getchars start=1&end=1][newFormValue][/getchars]= ] [text]newFormValue=[getchars start=2][newFormValue][/getchars][/text] [/showif][showif [getchars start=1&end=1&from=end][newFormValue][/getchars]= ] [text]newFormValue=[getchars start=2&from=end][newFormValue][/getchars][/text] [/showif][/loop][append db=xxx.db]someField=[url][newFormValue][/url][/append] ================================ Kenneth Grome, WebDNA Consultant 808-737-6499 http://webdna.net ================================------------------------------------------------------------- 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://search.smithmicro.com/ Kenneth Grome

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:

WebCat2: multiple currency support (1997) WebCat2b15MacPlugin - showing [math] (1997) not interpreting Q (2001) Search Results (1998) Not really WebCat- (1997) TCPConnect misbehavin' for me. (2000) WebCat2 several catalogs? (1997) [date] BUG! (2002) [OT] Mom's gift (2006) [format xs] freeze (1997) same bill to and ship to? (1998) no time stamp & different times from emailer (1998) Multi vendor shop (2000) [WebDNA] JSON parsing (2010) Append..... doesn't (2000) Quick Question (1997) Search returns all, not 20 (1997) Template Encryption (1998) newcart (1997) test (2006)