FW: [PEAR] Formbuilder and QuickForm - Redirects and Groups
| From: | Prue | Date: | Sat, 08 Oct 2005 03:38:47 +0000 |
| Subject: | FW: [PEAR] Formbuilder and QuickForm - Redirects and Groups | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-21279@lists.php.net to get a copy of this message | ||
I have moved on from point 2 - a bit more reading of the Formbuilder doco
helped! (sorry)
-----Original Message-----
From: Prue [mailto:prue@clipmagic.com.au] On Behalf Of Justin Patrin
Sent: Saturday, 8 October 2005 11:29 AM
To: pear-general@lists.php.net
Subject: [PEAR] Formbuilder and QuickForm - Redirects and Groups
Hello
I have a couple of which I hope will be easily solved, questions about FB
and QF. I have FB rendering to an array which is then sent to Smarty. Most
of this is working fine
1. How do I redirect the page once the data has been submitted and passed
validation. The error I'm getting is that a header has already been sent.
The only reference to an example of how to fix it in this archive no longer
exists. From Justin Patrin entitled "Re: [PEAR] formbuilder: where do you
put a redirect statement to redirect you to another page after".
"Check my FAQ entry for how to redirect.
> http://opensource.21st.de/tiki-view_faq.php?faqId=1#q4 goes
> nowhere.
2. Would someone please point out to me what I'm doing wrong setting groups
in a script.
** This works:
$el = HTML_QuickForm::createElement('date','pointyearto', 'Point Score
Year Ends', array('format'=> 'dFY'));
$builder->preDefElements['pointyearto'] = $el;
** This doesn't:
// Groups
//
// first set the fields
$bankgroup['bankbsb'] =
HTML_QuickForm::createElement('int','bankbsb', 'Bank BSB');
$bankgroup['bankacctno'] =
HTML_QuickForm::createElement('int','bankacctno', 'Bank Account
Number');
// add them to a group
$group = HTML_QuickForm::addGroup($bankgroup, 'bankgroup', 'Bank
Details', ' ');
// send the group to the form
$builder->preDefElements['bankgroup'] = $group;
The error returned is "Fatal error: Using $this when not in object context
in c:\wamp\www\myproject\include\PEAR\HTML\QuickForm.php on line 725"
Thanks
Prue
--
PEAR General Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php