orbeon / orbeon-forms

Orbeon Forms is an open source web forms solution. It includes an XForms engine, the Form Builder web-based form editor, and the Form Runner runtime.
http://www.orbeon.com/
GNU Lesser General Public License v2.1
518 stars 220 forks source link

Prevent or better support entirely deselected radio buttons #3757

Open ebruchez opened 6 years ago

ebruchez commented 6 years ago

HTML supports having a set of radio buttons of which none are selected. And Form Builder allows you to set radio buttons this way. This can be confusing because you can go from deselected → selected, but not the other way around.

Two approaches:

+1 from customer

ebruchez commented 6 years ago

So the quickest fix is to allow setting the empty string for single-selection controls in Edit Choices.

avernet commented 6 years ago

Note that this could be done automatically, based on whether the field is marked as required by form authors in Form Builder:

ebruchez commented 6 years ago

Having all radios deselected forces the user to do something, true, but even if required, it is weird to be able to go from deselected → selected, but not the other way around.

We had discussed something similar for fr:dropdown-select1, where I had proposed that once you have selected a value you cannot go back to blank, and we had decided that although cool it was not a good idea. The same logic should probably apply to radio buttons.

avernet commented 6 years ago

I agree.