juergenweb / FrontendForms

A module for ProcessWire CMS to create and validate forms on the frontend easily using the Valitron library.
MIT License
15 stars 1 forks source link

InputCheckboxMultiple changed wrapping from `<label>` to `<div>` #15

Closed donatasben closed 1 month ago

donatasben commented 1 month ago

Hi @juergenweb I have tried to update the module (2.2.13) but I noticed it started wrapping multiple checkboxes with a <div> instead of <label> as in previous versions. I haven't changed any of my setup, tested back with older version (2.2.3) and can confirm that it changed.

Maybe you implemented some option to choose which tag is used in multiple checkboxes and radios? The appendLabelOnCheckboxes doesn't seem to have effect on this.

2.2.3 Old (Good):

SCR-20240821-nais

2.2.13 New (Bad):

SCR-20240821-naop
juergenweb commented 1 month ago

Hello @donatasben

I was on vacation, but I will check this as soon as possible. I can remember there was a problem with
tags in the past in the vertical alignment of multiple checkboxes. I guess this problem results from this change.

Best regards Jürgen

juergenweb commented 1 month ago

I have set the tag to "label" and I haved changed 2 other files too. I guess there was a copy and paste problem in the past, which was responsible for the div tag instead of the label tag. I have tested it with all frameworks and with no framework on radio multiple and checkbox multiple:

Multiples

I have added it to Github now, but I will bump up the version after I have finished the new Slider Captcha (it is ready now, but there are small CSS bugs that I have to correct, before upgrading to the next version.

If you do not want to wait until the next update please replace the following files with the one from Github:

I will closes this issue for now. If this update does not solve your problem or you discover a new problem, please open a new issue report.

donatasben commented 1 month ago

Thank you @juergenweb! It works as expected with the newest version 2.2.14 🙏

juergenweb commented 1 month ago

Glad to hear that!!