Re: auto-stripping of spaces

This WebDNA talk-list message is from

1997


It keeps the original formatting.
numero = 15683
interpreted = N
texte = >Kenneth Grome wrote: >> >> >It'd be nice if WC would automatically strip any leading or >>ending spaces from >> >any field, or have a context for this. >> > >> >The reason is that a field with a number in it will not work within a math >> >context if there are any leading or ending spaces. >> > >> >Most db's I've worked with have a bunch of useless spaces, and I >>cna't think >> >of a reason for keeping any at the beginning or end of a data field. >> >> You can make WebCat refuse to accept data from a form field when it >> has spaces in it. That's the easiest way to deal with this problem, I >> do this all the time, and it works like a charm ... :) > >What's the HTML?On the data collection page, there's nothing special to put into the HTML, just create a regular form with fields that allow the user to enter his/her data. The next page is where the 'fun stuff' belongs. On that page, use something like this:[hideif [field1]^ ] --> Put your [append] context here <-- Thanks for filling out the form properly! [/hideif][showif [field1]^ ] Sorry, you entered a blank space in the [field1] field, and that's a no-no. Please go 'Back' and try again, but this time, don't enter any blank spaces! :) [/showif]>Can you limit form data to text or number?I think you could, but you may have to perform several [math] tests the field data, then comparing the results to what you would *expect* to see when the correct values are entered ...Sincerely, Ken Grome ken@iav.com 808-737-6499 WebDNA Solutions http://www.hui.net/ Associated Messages, from the most recent to the oldest:

    
  1. Re: auto-stripping of spaces (Kenneth Grome 1997)
  2. Re: auto-stripping of spaces (Kenneth Grome 1997)
  3. Re: auto-stripping of spaces (Pat McCormick 1997)
  4. auto-stripping of spaces (Pat McCormick 1997)
>Kenneth Grome wrote: >> >> >It'd be nice if WC would automatically strip any leading or >>ending spaces from >> >any field, or have a context for this. >> > >> >The reason is that a field with a number in it will not work within a math >> >context if there are any leading or ending spaces. >> > >> >Most db's I've worked with have a bunch of useless spaces, and I >>cna't think >> >of a reason for keeping any at the beginning or end of a data field. >> >> You can make WebCat refuse to accept data from a form field when it >> has spaces in it. That's the easiest way to deal with this problem, I >> do this all the time, and it works like a charm ... :) > >What's the HTML?On the data collection page, there's nothing special to put into the HTML, just create a regular form with fields that allow the user to enter his/her data. The next page is where the 'fun stuff' belongs. On that page, use something like this:[hideif [field1]^ ] --> Put your [append] context here <-- Thanks for filling out the form properly! [/hideif][showif [field1]^ ] Sorry, you entered a blank space in the [field1] field, and that's a no-no. Please go 'Back' and try again, but this time, don't enter any blank spaces! :) [/showif]>Can you limit form data to text or number?I think you could, but you may have to perform several [math] tests the field data, then comparing the results to what you would *expect* to see when the correct values are entered ...Sincerely, Ken Grome ken@iav.com 808-737-6499 WebDNA Solutions http://www.hui.net/ 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:

A multi-processor savvy WebCatalog? (1997) Shipcost lookup? (1997) rename a file (1997) Credit Card Number checking (1997) TCPconnect - Windows to Apache (2007) Sorting a [listfiles] (2003) Banner DNA (1997) See [shell]s (2008) Late on Friday.... brain fried (2002) &fieldsdir=ra truely random?? (2000) WebCat on Apache (2002) WCS Newbie question (1997) Re: (1998) Images do not upload completely ... (2003) RE: WebCatalog2 for NT Beta Request (1997) TPC Connect (1999) RE: Loss in form (1998) Sendmail question [Newbie] (1999) change the number format (1997) what the... (2004)