craue / CraueFormFlowBundle

Multi-step forms for your Symfony project.
MIT License
736 stars 118 forks source link

Allow to add custom HTML attributes on buttons #298

Open Florian-B opened 6 years ago

Florian-B commented 6 years ago

This feature allows to add custom attributes on buttons (very useful for tracking or javascript).

{% include '@CraueFormFlow/FormFlow/buttons.html.twig' with {
    craue_formflow_button_attr_finish: {'data-foo': 'bar'},
    craue_formflow_button_attr_reset: {'data-foo': 'bar', 'data-bar': 'foo'},
} %}

Will add data-foo="bar" attribute for finish button and data-foo="bar" data-bar="foo" attributes for reset button

See: https://github.com/craue/CraueFormFlowBundle/issues/267

coveralls commented 6 years ago

Coverage Status

Changes Unknown when pulling c440605139c79129974aa7c3686a7cfbcacaf1c9 on Florian-B:allow-custom-attr-on-buttons into on craue:master.

coveralls commented 6 years ago

Coverage Status

Changes Unknown when pulling c440605139c79129974aa7c3686a7cfbcacaf1c9 on Florian-B:allow-custom-attr-on-buttons into on craue:master.

coveralls commented 6 years ago

Coverage Status

Changes Unknown when pulling 93f2a049bc41d2ddcd9f889fa769a23d260e2b23 on Florian-B:allow-custom-attr-on-buttons into on craue:master.

coveralls commented 6 years ago

Coverage Status

Changes Unknown when pulling 93f2a049bc41d2ddcd9f889fa769a23d260e2b23 on Florian-B:allow-custom-attr-on-buttons into on craue:master.