Re: Quickform and an array of elements in html
| From: | Alexey Borzov | Date: | Tue, 03 Jun 2003 17:58:52 +0000 |
| Subject: | Re: Quickform and an array of elements in html | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-5765@lists.php.net to get a copy of this message | ||
Hi!
Bertrand Mansion wrote:
<mcarter@quantiv.com> wrote :Actually this happens because you click the "Submit" button and the submitted value (that was not set before) for it becomes "Submit". If you clicked the "Cancel" button, then both buttons would read "Cancel" after form submit. Either use different names for different submit buttons or convince Bertrand that this behaviour is not good.However if I submit the form and it then re-displays (due to a validation error) it all goes wrong and I end up with two buttons identical in the output html:- <input name="action_button[action]" value="Submit" type="submit" /> <input name="action_button[action]" value="Submit" type="submit" /> I think this is because the elements 'name' is used as the index in the array - how am I able to get the buttons to appear as an array but not step on each others toes? Does the answer lie within the $form->addGroup() method? But why does it work the first time.....?
Try to upgrade to the last release.This won't help... We decided that submit buttons *should* get their value from submitted values, remember? Maybe we should reconsider?