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 theHTML, just create a regular form with fields that allow the user toenter 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 ano-no. Please go 'Back' and try again, but this time, don't enter anyblank spaces! :)[/showif]>Can you limit form data to text or number?I think you could, but you may have to perform several [math] teststhe field data, then comparing the results to what you would *expect*to see when the correct values are entered ...Sincerely,Ken Gromeken@iav.com808-737-6499WebDNA Solutionshttp://www.hui.net/
Associated Messages, from the most recent to the oldest:
>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 theHTML, just create a regular form with fields that allow the user toenter 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 ano-no. Please go 'Back' and try again, but this time, don't enter anyblank spaces! :)[/showif]>Can you limit form data to text or number?I think you could, but you may have to perform several
[math] teststhe field data, then comparing the results to what you would *expect*to see when the correct values are entered ...Sincerely,Ken Gromeken@iav.com808-737-6499WebDNA Solutionshttp://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)