Re: Quickform and setConstants - question
| From: | Justin Patrin | Date: | Mon, 21 Nov 2005 21:31:43 +0000 |
| Subject: | Re: Quickform and setConstants - question | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-22039@lists.php.net to get a copy of this message | ||
On 11/21/05, l Burnerheimerton <lburnerheimerton@yahoo.com> wrote:
> Instead of:
> $form->addElement('hidden', 'goToNextPage',
> 'page2.htm');
>
> for security, I should use:
> $form->setConstants('goToNextPage'=>'page2.htm');
>
> When I try this, the variable "goToNextPage" does NOT
> carry over into the proces_data function.
>
> I need a variable to be sent to the function but not
> changeable in any way.
>
> Any ideas?
>
You need to add the hidden element *and* setConstants. If you don't
create an element the value won't be passed.
--
Justin Patrin