Re: Re: How to use HTML_Table with HTML_QuickForm

From: Date: Thu, 18 Aug 2005 13:25:26 +0000
Subject: Re: Re: How to use HTML_Table with HTML_QuickForm
References: 1 2 3 4 5  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-20464@lists.php.net to get a copy of this message
Joe Culler wrote: > Here is my code: > <?php > require_once "HTML/QuickForm.php"; > require_once "HTML/Table.php"; > require_once "HTML/QuickForm/Renderer/QuickHtml.php"; > > $form = new HTML_QuickForm('form', 'POST'); > > $form->addElement('text', 'name', 'Input text:'); > $form->addElement('submit', 'submit', 'Submit'); > $form->addRule('name', 'Please input name', 'required'); [...] I would suggest that put the second form ($tableForm) in a second script. After the first form is submitted and validated, you can store the entered values in a session and then redirected via header(...) to the second (table) form. > if ($form->validate()) This will fail when submitting the table form because in this form there is not a "name" field. Try it the way described above. Mark

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