Skip to content

Commit c440605

Browse files
author
florian.bogey
committed
Allow to add custom HTML attributes on buttons
1 parent 8ee11ef commit c440605

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,23 @@ Example:
295295
} %}
296296
```
297297

298+
Always in the same way, you can add custom HTML attributes:
299+
300+
- `craue_formflow_button_attr_last` for either the __next__ or __finish__ button
301+
- `craue_formflow_button_attr_finish` for the __finish__ button
302+
- `craue_formflow_button_attr_next` for the __next__ button
303+
- `craue_formflow_button_attr_back` for the __back__ button
304+
- `craue_formflow_button_attr_reset` for the __reset__ button
305+
306+
Example:
307+
308+
```twig
309+
{% include '@CraueFormFlow/FormFlow/buttons.html.twig' with {
310+
craue_formflow_button_attr_finish: {'data-foo': 'bar'},
311+
craue_formflow_button_attr_reset: {'data-foo': 'bar', 'data-bar': 'foo'},
312+
} %}
313+
```
314+
298315
You can also remove the reset button by setting `craue_formflow_button_render_reset` to `false`.
299316

300317
## Create an action

0 commit comments

Comments
 (0)