Skip Navigation

[Resolved] Labels for checkboxes can't be clicked in forms

This support ticket is created 5 years, 3 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Our next available supporter will start replying to tickets in about 0.14 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 1 reply, has 2 voices.

Last updated by Nigel 5 years, 3 months ago.

Assisted by: Nigel.

Author
Posts
#1299175
2019-07-24_09-17-44.png

I am trying to:

To create a form with a checkbox.

I expected to see:

A checkbox with a label that can be clicked

Instead, I got:

A checkbox with a label, that can not be clicked

The problem is, that labels have the "for" attribute set with a different value, than the id of the checkbox. Therefor it can't be clicked.

Solutions:
* no "for" on the label, as it encapsulates the input
* same "for" and "id" for label and input

#1299269

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Adrian

I double-checked on my own test site and it is working when I add a checkbox field to a form, as the for attribute of the label and the id of the checkbox input correspond.

Can you confirm exactly what field type you include in the form?

A Types checkbox field? Or checkboxes? Or a generic field?