Closed
Description
Description
Similar to the MoneyType
currency
option, it would be beneficial to add an option to the PercentType
that would allow disabling the percent symbol (%). The default should be true
to keep backward compatibility, but accept false
to disable it being rendered in Twig.
Example
$this->createFormBuilder($entity)
->add('percent', PercentType::class, [
'symbol' => false,
]);
...
{{ form_widget(form.percent) }}
The above would render:
<input type="text" id="my_form_percent" name="percent" required="required">