QuickForm problem with two forms in one page having an element with the same name

From: Date: Mon, 12 Apr 2004 02:29:54 +0000
Subject: QuickForm problem with two forms in one page having an element with the same name
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-11778@lists.php.net to get a copy of this message
Hello! I have a page with two QuickForm forms, each contains a hidden field called "action" with either the string "new" or "edit". When the user submits the form, the script decides which of the form objects validate methods to use, depending on the string received from the action field of the form submitted. I added a server side required validation for the text fields in each form. The problem I have is the following: When I submit one of the forms emtpy I get the page with the correct errors telling me I have to fill in all fields, but the action fields in both forms suddenly have the same value! I attached a very short demo script, anyone knows what I did wrong? ;) regards, Goeran Zaengerlein

« previous php.pear.general (#11778) next »