set two different labels for two different pages that use the same form - symfony
I have a form and I need to set labels for two different kind of pages. I tried to used $this->widgetSchema->setLabels...
with an if
and with $sf_params->get('module')
and $sf_params->get('action')
but I got an error saying that $sf_params is an undefined variable. What can I do to solve this开发者_JS百科?
In your template, you can pass to renderLabel() the label you want.
$form['xxx']->renderLabel('Your label')
精彩评论