RE: [PEAR] Actions based on rules
| From: | Mark Steudel | Date: | Mon, 29 Oct 2007 12:40:02 +0000 |
| Subject: | RE: [PEAR] Actions based on rules | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-28136@lists.php.net to get a copy of this message | ||
Hi there I'm just trying to understand, in this case he'd have to move the
individual validation from any of the form elements into one addFormRule
validation function, is that what you are saying?
Mark
-----Original Message-----
From: Bertrand Mansion [mailto:golgote@mamasam.com]
Sent: Monday, October 29, 2007 11:12 AM
To: Nicolas de Bari Embriz Garcia Rojas
Cc: PEAR general list
Subject: Re: [PEAR] Actions based on rules
Le 29 oct. 07 à 06:36, Nicolas de Bari Embriz Garcia Rojas a écrit :
> Hi all, I am using html_quickform for requesting url and tile but
> i would like to display a check box (continue anyway) if one of the
> rules (not a valid url) do not pass, at the moment i am doing this:
>
> if ($this->validate() && !empty($_POST['url'])) {
> $this->tpl->assign('checkbox',true);
> $this->addElement('checkbox','continue',_('Continue
> anyway'));
> }
>
> Is there a way to get the output or the registerRules so later
> based on that output do some actions?
For this, I'd suggest you use addFormRule() and let the form go if
the checkbox is checked.
--
PEAR General Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php