Re: Actions based on rules

From: Date: Mon, 29 Oct 2007 09:12:00 +0000
Subject: Re: Actions based on rules
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-28134@lists.php.net to get a copy of this message
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.

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