Custom radio fields do not allow both a clear button and a maximum options per line
Overview
When the Multiple Options Per Line for a radio button is enabled the clear option disappears for a custom field
See on stack exchange https://civicrm.stackexchange.com/questions/35885/why-is-the-clear-option-missing-on-a-custom-field-with-radio-options.
Reproduction steps
- Create a custom field
- Make the field type Radio
- Put in the Options Per Line a number larger than 0
- Now in the use of the custom field the clear option is not visible
Below a version with Options Per Line and without
Expected behaviour
The clear option should be shown when there are more options per line. I do not know exactly where.
Environment information
- CiviCRM 5.28
Technical details
The bug can be fixed in templates/CRM/Custom/Form/Edit/CustomField.tpl
In the if statement {if $element.options_per_line != 0 }
the logic can be found to allocate the option lines in different rows. Here the clear box and the configure wrench are forgotten.
In the {else}
part a {$formElement.html}
is used that generates the correct interface elements