grav-plugin-form icon indicating copy to clipboard operation
grav-plugin-form copied to clipboard

Checkbox has extra padding because of invisible, duplicated label

Open NicoHood opened this issue 3 years ago • 2 comments

The current checkbox implementation has an invisible label which causes the form to add an ugly extra margin

grafik grafik

The "real" label is placed right next to the input field, and thatswhy the normal label is not needed. In the code the label is cleared (empty block), but the div around will still be there.

I will upload a PR shortly that should be linked by github itself.

NicoHood avatar Sep 28 '20 10:09 NicoHood

This is definitely an issue for me too. I'm trying to write a plugin to integrate forms with Bootstrap 5 and I've pretty much had to rewrite the field layout template to hide the label if the label block is empty. It's worse with bootstrap as the label is 24px high even when empty.

SeriousKen avatar Jan 24 '21 15:01 SeriousKen

@SeriousKen You can also use display_label: false on each field as a workaround for now.

NicoHood avatar Jan 25 '21 17:01 NicoHood