[dev] horde_form / read-only fields

Marko Djukic marko at oblo.com
Wed Feb 26 05:42:38 PST 2003


Quoting Chuck Hagenbuch <chuck at horde.org>:

> Quoting Marko Djukic <marko at oblo.com>:
> 
> > if a field is marked as required, but then during some logic is switched
> > over to 'read-only' when being set up (ie. same form code being used in a
> > few situations)... it remains required, will generate unseen "is required"
> > messages and fail to submit.
> >
> > should a read-only, required field be passed along as hidden, or in
> > should this be handled behind the sense, or something completely
> > different?
> 
> I'm not sure how we're supposed to answer the question without seeing the
> code in question, but it sounds like you should be doing the logic *before*
> creating the field.
> 
look at giapeto/lib/Edit.php, line 61 for example. wanted the field to edit the
page name be available only if the page is not the root one. but i had to add
also the toggle between required/not required too.

m.


More information about the dev mailing list