grav-plugin-form
grav-plugin-form copied to clipboard
checkboxes are not rendered in data.html.twig email body when used in fieldsets
Like I mentioned in another issue, something seems broken with the checkbox.html.twig
template.
I define checkbox fields like this in my form.md
beratung:
type: checkbox
outerclasses: px1 w12 mb1
label: "Beratung vor Ort"
But when sending the email, they will not appear in the email body.
Just figured out, there seems to be a problem when using checkboxes inside a fieldset. Outside fieldsets, checkboxes are rendered properly.
form:
name: multistep-form
classes: multistep
fields:
### THIS WORKS
- name: test2133
type: checkbox
label: "Test"
- name: step1
id: step1
type: fieldset
legend: ''
fields:
### THIS DOESN'T
test2:
type: checkbox
label: "Test"
Same for using forms with columns btw...
Forms with columns arent supported for frontend, only for the admin panel. Maybe that is the issue? I am not sure about fieldsets.
Which template are your using for sending the email? I guess it is this one: https://github.com/getgrav/grav-plugin-form/blob/develop/templates/forms/default/data.html.twig
This does not support fieldsets at all. So its not an issue of the checkboxes, it is an issue of the fieldset. Is the fieldset really required?