Skip to content

Latest commit

 

History

History
62 lines (47 loc) · 1.72 KB

FormExtension.md

File metadata and controls

62 lines (47 loc) · 1.72 KB

Meritoo Common Bundle

Common & useful classes, resources, extensions. Based on Symfony framework.

FormExtension

Located here: Meritoo\CommonBundle\Twig\FormExtension. It's Twig extension related to the FormService service. Allows to use functionality provided by the FormService service in Twig templates.

Functions

meritoo_common_form_is_html5_validation_enabled()

Returns information if HTML5 inline validation is enabled. Exactly as Meritoo\CommonBundle\Service\FormService::isHtml5ValidationEnabled() method.

The HTML5 validation may be enabled or disabled in config/packages/meritoo_common.yaml configuration file. By default is enabled.

Example below:

meritoo_common:
    form:
        novalidate: true
<form{% if not meritoo_common_form_is_html5_validation_enabled() %} novalidate{% endif %}>
    {# ... #}
</form>

Result:

<form novalidate>
    {# ... #}
</form>

More

  1. Configuration
  2. Dependency Injection Extension
  3. Descriptor of application
  4. Descriptor of bundle
  5. Descriptors of bundles
  6. Services:
  7. Tests
  8. Translations
  9. Twig extensions:

‹ Back to Readme