[Solar-talk] Another form question
Oscar
oscar at oscarm.org
Wed Nov 21 09:40:30 CST 2007
Rodrigo Moraes wrote:
> On Nov 21, 2007 1:56 AM, Oscar wrote:
>> Elements can have a 'descr' attribute which is "A longer description of
>> the element, such as a tooltip or help text."
>>
>> Is this attribute displayed when the form is rendered?
>
> Actually, no. 'descr' is just a placeholder for a future feature. I
> hacked Solar_View_Helper_Form to include a description right after the
> form field. Around line 593:
>
> // add the form element
> $form[] = " <dt$require><label$require
> for=\"$id\">$label</label></dt>";
> $form[] = " <dd$require>$element";
>
> // A haaack!
> if (! empty($info['descr'])) {
> $form[] = " <p>{$info['descr']}</p>";
> }
>
> -- rodrigo
> _______________________________________________
> Solar-talk mailing list
> Solar-talk at lists.solarphp.com
> http://mailman-mail3.webfaction.com/listinfo/solar-talk
Excellent - that's what it looked like to me, but I was a little more
wary of hacking away :)
One tweak, to make the descr more styleable:
// A haaack!
if (! empty($info['descr'])) {
$form[] = " <div
class=\"descr\">{$info['descr']}</div>";
}
More information about the Solar-talk
mailing list