Form helper 'descr' implemented (was Re: [Solar-talk] Another form question)

Antti Holvikari anttih at gmail.com
Thu Nov 29 11:00:58 CST 2007


On Nov 26, 2007 4:09 AM, Paul M Jones <pmjones at solarphp.com> wrote:
> On 21 Nov 2007, at 11:49, Rodrigo Moraes wrote:
>
> > On Nov 21, 2007 2:10 PM, Oscar wrote:
> >> Paul M Jones wrote:
> >>> On Nov 21, 2007, at 9:40 AM, Oscar wrote:
> >>>
> >>> Sounds like it's time to make this "real".  ;-)  For
> >>> Solar_View_Helper_Form, then:
> >>>
> >>> * Add a $_descr_tag property and config, default value 'div' (but
> >>> you
> >>> can make it 'p').  This is the tag that goes around the
> >>> description XHTML.
> >>>
> >>> * Add a $_descr_class property and config, default value
> >>> 'descr' (for
> >>> the class so you can style it).
> >>>
> >>> * Add a $_descr_elem property and config, default value 'dt' (to say
> >>> where the description should be rendered, as part of the 'dd' or
> >>> as part
> >>> of the 'dt' element).
> >>>
> >>> And then add the necessary rendering logic as you guys have done.
> >>>
> >>> Does that sound sufficiently useful and flexible?  (I don't want it
> >>> *too* flexible -- too many options can be a bad thing.)
> >>>
> >> Looks more than flexible enough to me.
> >
> > Yes, sounds fine to me too. I really don't mind about which tag is
> > used, if you would ask me. I would adapt the CSS rule for the one that
> > is used. Also, for me it could be placed inside dd or dt, as far as it
> > is displayed "somewhere". Really, but it is nice to have this option.
> > :)
>
> At long long last, this is implemented in SVN, as of revision 2956.
> Let me know how it works for you guys.

Suddenly I see DESCR_* texts everywhere in my forms. I think it would
make sense to only show the 'descr' text if there is something. Like,
check to see if it is != "DESCR_{$element_name}", and only then
display??


-- 
Antti Holvikari


More information about the Solar-talk mailing list