Re: HTML_QuickForm | putting 'submit' and 'reset' in a group

From: Date: Tue, 09 Dec 2003 08:33:46 +0000
Subject: Re: HTML_QuickForm | putting 'submit' and 'reset' in a group
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-9399@lists.php.net to get a copy of this message
<jam@zoidtechnologies.com> wrote : > greetings, > > for layout purposes, I'd like to have the 'submit' and 'reset' buttons > in a > group so they are displayed next to each other instead of on seperate lines. > > -- snip -- > $group = array(); > $group[] = &HTML_QuickForm::createElement("submit", "submit", > "submit"); > $group[] = &HTML_QuickForm::createElement("reset", "reset", > "reset"); > $form->addGroup($group); > -- snip -- > > the problem is that when I click the 'reset' button, the form actually > *submits*.. is there something I need to check for in the code to trap this? > when I click reset, I expect it to 'undo' my changes, but certainly not to > submit the form. > > is there an example someplace that I can look at? Your code works for me. What does the generated html looks like ? Bertrand Mansion Mamasam

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