Re: Form parsing question
- From: "Jukka K. Korpela" <jkorpela@xxxxxxxxx>
- Date: Mon, 10 Sep 2007 22:34:50 +0300
Scripsit David De Cristoforo:
That's what I need..for the "form handler" to ignore anything with the
value of "0". In this case the "form handler" is a "typical" form mail
pearl script.
Unfortunately, a "typical" form mail script is simplistic: it just collects data and sends it as an e-mail message. But if you have control over the script (i.e., you can write it or modify it or make someone else to do that by your wishes), it can of course perform a simple check on any field or on selected fields, ignoring (for example) fields with a value of 0. It's just an if statement, or some if statements.
Independently of this, a field for inputting a quantity would probably be better handled using a text input field rather than <select>. For one thing, it's faster to type in "1" (or some other number) than to select "1" from a dropdown list. Moreover, this approach lets any quantity to be entered by the user. This might be seen as a problem, too: you need to check the input data in the form handler or elsewhere. But that should be done anyway.
Using text input fields, the problem would be slightly different, though not more difficult: the form handler's if statement(s) would not check against a value of "0" but against the empty string "".
--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/
.
- Follow-Ups:
- Re: Form parsing question
- From: David De Cristoforo
- Re: Form parsing question
- References:
- Form parsing question
- From: ( ) David De Cristoforo
- Re: Form parsing question
- From: Jukka K. Korpela
- Re: Form parsing question
- From: David De Cristoforo
- Form parsing question
- Prev by Date: Re: Error when openening html code in browser
- Next by Date: Re: Old HTML?
- Previous by thread: Re: Form parsing question
- Next by thread: Re: Form parsing question
- Index(es):
Relevant Pages
|
|