Eva Dias
Eva Dias

Reputation: 1747

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?

Upvotes: 0

Views: 47

Answers (1)

arsenik
arsenik

Reputation: 1017

In your template, you can pass to renderLabel() the label you want.

$form['xxx']->renderLabel('Your label')

Upvotes: 1

Related Questions