Sounds like you are trying to do something that breaks standards...
Why would you want a <label> tag that does not link to a form element?
Maybe you want to use an <li> or <span> or some other element?

Which part of the widget would be the label? The value?

How about <li><?php echo $form->getDefault("my_widget_name"); ?></li>

You can also look at getValue() - but be aware that only gets cleaned
values.

The label is part of the widget, so there is no use case for a label
"widget". renderLabel() renders the label of a widget.

On Jun 4, 10:00 pm, fRAnKEnSTEin <shirkav...@gmail.com> wrote:
> Hi there,
>
> Is there any way of rendering a form widget as a label? for example if
> i have a form called ""fooForm" defined as:
>
> ...
> ...
> public function configure()
> {
>      ...
>      ...
>      $this->setWidgets(array(
>             'price'               => new sfWidgetFormInputText(),
>      ));
>      ...
>      ...
>
> }
>
> then in my template:
>
> <div> <?php echo $form['price']->render() ?> </div>
>
> Instead of rendeing the widget as an input text element, i need to
> render it like a label element. I have searched is there is any
> "sfWidgetFormLabel" or something but there is not.
>
> Any idea?
>
> Cheers

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to