[dev] conditional_enable in Horde_Form_Action
ali mohammed
nefertitian at gmail.com
Thu Jul 21 07:37:26 PDT 2005
Hi,
I've been having some trouble incorporating the conditional_enable
type in my forms. I've even pretty much copied the same code from the
http://wiki.horde.org/Doc/Dev/FormPackage?referrer=Doc%2FDev webpage,
but even that doesnt seem to work.
Below is my actual code....
class xyz extends Horde_Form {
function xyz(&$vars) {
......
......
$params = array ('target'=>'choices', 'enabled'=>true,
'values'=array('other'));
$choices = array('big'=>'BIG','small'=>'SMALL','other'=>'Other');
$action = &Horde_Form_Action::singleton('conditional_enable', $params);
$this->addVariable('Select Something', 'choices','enum',
true, false, '', array($choices, true));
$o = &$this->addVariable('seroiusness', 'other_text',
'text',false,false);
$o->setAction($action);
........
}
When I instantiate and render the above form, pretty much the whole
form shows up including the above two form fields irrespective of the
value of 'choices'.
Could anybody help me on where I am going wrong?
thanks in advance,
nefertitian.
More information about the dev
mailing list