开发者

set two different labels for two different pages that use the same form - symfony

开发者 https://www.devze.com 2023-04-04 09:17 出处:网络
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->ge

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')
0

精彩评论

暂无评论...
验证码 换一张
取 消