Keith,

I've been following that series closely.  I'm hoping to do this without
writing a custom decorator for an element as I'd like the option to omit the
the form field this non form element might be related to.  For example, if a
user were allowed three attachments per node/form, the actual file upload
element might be omitted if a user were to edit a node that already had
three attachments.  In other places I have created a hidden element which is
modified using javascript, but since this need keeps coming up I'm
interested in finding a way to add a non form field element that doesn't
involve me hacking around dummy fields.

I don't know of a good way to do what you are trying to do, but you could add the information to the description of the hidden element and it will show up without using any javascript. It's still pretty hacky though.

$fileInfo = new Zend_Form_Element_Hidden('fileinfo');
$fileInfo->setDescription($fileName);

In my experience it's been hard to add anything but elements, labels and descriptions to a form.

Daryl

Reply via email to