Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Form] PercentType support for hiding the percent symbol #28796

Copy link
Copy link
Closed
@d42ohpaz

Description

@d42ohpaz
Issue body actions

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">

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.