When calling a form using
print $widget->render()
rather than printing
<li>
<label ...>
<input ...>
</li>
How can I have it print
<p>
<label ...>
<input ...>
</p>
PS: in my form:
public function configure()
{
$this->widgetSchema->setFormFormatterName('list');
}
You will have to create your own form schema formatter class as explained here. For example, to use a paragraph you can just redeclare the $rowFormat variable:
If you want to use this format for all forms of your project add it to your ProjectConfiguration class (and remove the $this->widgetSchema->setFormFormatterName(‘list’) from your form):
If you want to use it only for one form, add this your form class: