[horde] addVariable of type 'link' on Horde_Form

Tom Hodder tom at scriptsupport.co.uk
Mon Dec 15 17:08:03 PST 2003


Quoting Marko Djukic <marko at oblo.com>:

> Quoting Tom Hodder <tom at scriptsupport.co.uk>:
>
> > Hello,
> >
> > I'm trying to add a 'link' variable to a form with the addVariable method
> of
> > Horde_Form, but I can't references to it in the docs. well I can, but its
> not
> > helping much with the required parameters;
> >
> > void &addVariable( mixed $humanName, mixed $varName, mixed $type, mixed
> > $required, [mixed $readonly = false], [mixed $description = null], [mixed
> > $params = array()])
>
> the required params are the same as basic params for any horde_form var. put
> in
> a human name (ie label), the name of the var itself, the type (link) and
> whether it is required or not.
>
> it's exactly the same as a text input field, only difference is that its
> display
> gets formatted to be a link.
>
> m.
>

ok, but if I do this;
$form->addVariable( $_prefs[$member]['desc'], $member , 'text', false, true);
I get a readonly text field in my form.

if I do this;
$form->addVariable( $_prefs[$member]['desc'], $member , 'link', false, true);

I get the following error;
"Warning: Missing argument 1 for init() in C:\Inetpub\horde\lib\Form.php on line
1529"
and a label for the field but no value.

and I've tried hard-coding a variety of differnt values for $description and
$params, but to no avail.

Cheers,

Tom H


----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.



More information about the horde mailing list