Required items in a form
Tim Roberts
timr at probo.com
Fri Jul 4 01:31:56 EDT 2008
"Brandon" <deanfamily11 at verizon.net> wrote:
>
>What I'm trying to do is essentially force a user to fill in required items
>in a form, which will be saved to a database. How can I get it so that once
>the user clicks "OK" on the dialog box, it transfers control back to the
>form, and not save the empty fields into the database?
What do you mean by "transfers control back to the form"? A form doesn't
have any code, and so can't "control" anything.
Now, it is certainly possible to define an onSubmit handler in the <form>
header, then write a Javascript function that validates the input. If the
function returns false, the submit won't happen.
--
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.
More information about the Python-list
mailing list