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:

WebCat and OS9 (1999) unable to launch acgi in WebCat (1997) [WebDNA] .html extension (2012) [SHOWIF AND/OR] (1997) Include vs. lookup? (1998) RAM variables (1997) [WebDNA] i wish we could require one *amongst of a collection* of search comparisons/params (2011) Shipcost formula (2004) formatting dates from a field ... (1997) Search Context: How to set Max=N? (2000) Email Attachments (1998) slowness (1998) Forms Search Questions (1997) [WebDNA] Help me install WebDNA (2012) Secure Server (1997) Major Security Hole IIS NT (1998) WebCatalog NT beta 18 problem (1997) lineIndex help... Please (1998) Orderfile Info is Dissappearing (1998) missing records (1998)