Re: Form parsing question



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/

.



Relevant Pages

  • Re: Form parsing question
    ... script (i.e., you can write it or modify it or make someone else to do that ... better handled using a text input field rather than. ... you need to check the input data in the form handler or elsewhere. ...
    (alt.html)
  • Re: Form parsing question
    ... That's what I need..for the "form handler" to ignore anything with the ... pearl script. ... accomplish, since you did not post a URL. ... And thanks for yoiur help. ...
    (alt.html)