Quickform container(true) problem and validation question
| From: | Mike Potts | Date: | Wed, 02 Mar 2005 02:37:15 +0000 |
| Subject: | Quickform container(true) problem and validation question | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-17794@lists.php.net to get a copy of this message | ||
hello,
i was trying to clear out the container values by doing a
$pager->controller->container(true) in the _process method( i believe
it's _process, i don't have the code in front of me, but it's the
action) and it's after my last page.. after i clear it, i send it back
to the first page of the form and go through the form again. through
my testing, i found that all of the container was reset except the
values that were set in the last page of the form. if i add in a
check to see if the last page information from the container is empty
in the while building the form in the first page, and clearing it if
it's not empty, that fixes the problem, but seems as if the (true) is
not acting as should function. i tried repeating the problem with the
example code included with the quickform package and it does the same
thing.
second question,
i was wondering if there is a way to do conditional verification.
for example, i have two fields one select and one textbox, the textbox
is a hidden element(via css and javascript) unless the select is on a
particular option. sooo.. i can't figure out a way to make the
textbox a required field if a particular option is selected, but not
any other option is selected.
thanks in advance,
mike