Hi Adam,

I actually never tried it, but judging on the code of the form
framework you could try this:

Either use the method setHelp($name, $help) or setHelps(array $helps)
on the widget schema of the form in your configure() method, or pass
the help text manually in the method renderRow():

public function configure()
{
$this->setWidgets(array(...));
$this->setValidators(array(...));

$this->widgetSchema->setHelps(array(...));
}

or

$form['my_field']->renderRow($attributes=array(), $label=null,
$help='My custom help text');


Bernhard


On Mon, Sep 22, 2008 at 11:15 PM, Adam <[EMAIL PROTECTED]> wrote:
>
>
> Has anyone ever added descriptive help text to their forms (1.1
> forms)?
>
> The form layout supports labels and error messages. but I also need to
> have a sentence long description for each field explaining what this
> field is.
>
> This needs to be a code based solution; not just manually hardcoding
> the descriptions in a template as I will have lots of forms and
> fields.
>
> Ideally, I'd like for $form->render() to display the text.
>
> What's the best way to implement that?
>
> And as I don't want to duplicate effort, has anyone done this before?
>
> P.S. As an added bonus, it would be nice have descriptive text shown
> for each option in a dropdown; automatically displayed when the
> dropdown changes.  I assume this would mean creating a new widget.  Is
> that right?
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-devs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to