[dev] Question to Horde Form Actions
Karim Geiger
geiger at b1-systems.de
Tue Jul 10 09:54:04 UTC 2012
Hi Jan,
Am 09.07.12 15:17, schrieb Jan Schneider:
> You need to attach an action to the training_classroom variable instead,
> because this is the field that should trigger the action (disabling the
> second field).
Okay I've tried attaching the action to the other variable.. that's what
the code looks like:
$o = $this->addVariable(_("Mobile classroom"),
'training_needclassroom', 'enum', true, false, _("Do we need to
prepare a mobile classroom?"), array(array(1 => _('yes'), 0 =>
_('no')), true));
$params = array('target' => 'training_sub', 'enabled' => true,
'values' => array(1)); $o->setAction(new
Horde_Form_Action_ConditionalEnable($params));
$this->addVariable(_("Sub-Item"), 'training_sub', 'text', false);
> And you might want to use the reload action instead, so that you can
> completely ignore the other field if necessary.
Could you please send me an example of reload actions?
Thanks,
Karim
(sorry for the second mail.. forgot to reply to the mailing-list)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 559 bytes
Desc: OpenPGP digital signature
URL: <http://lists.horde.org/archives/dev/attachments/20120710/ca54ed1d/attachment.bin>
More information about the dev
mailing list