I don´t know if this is strictly a bug but I wanted to report it as a strange and unexpected behaviour.
I wanted a "Have read the agreement" type of confirmation checkbox.
For "stytling" reasons the text ("Have read and agreee...") was done with a markup element (also I needed a link to the terms), so I didn´t want any text on the checkbox label.
Thus the checkbox was like:
-Options: read|
-Multiple:true

Here comes the "pull your hair" bit. After hours of struggling to see why the form wouldn´t submit I saw that if the checkbox was unchecked there was no problem, but when checked the webform wouldnt submit, no errors, nothing, it just sat there...

It so happens that if the second parameter of the options is empty the form won´t submit. I wanted no text , so i just put white spaces and voila!!.
-Options: "read| "
Any reasons for this?

Comments

quicksketch’s picture

I'm not sure Webform should work without a label on options, it's certainly not something that is intentionally supported.

quicksketch’s picture

Status: Active » Closed (won't fix)

For "stytling" reasons the text ("Have read and agreee...") was done with a markup element (also I needed a link to the terms), so I didn´t want any text on the checkbox label.

In new versions of Webform, a label is required, but now you may include HTML in radio button and checkbox options, so overall this situation wouldn't occur. As Webform isn't made to allow checkboxes without radio buttons, this is a won't fix.