Closed 5silver closed 6 years ago
note I don't know the code (at all!) but this change in CF7BS_Form_Field.php I think shows what I'm thinking (there is probably a different / better way to do this!) :)
$label_required = '';
if ( 'required' == $mode || 'radio' == $type) {
$append .= ' aria-required="true" required';
$label_required = ' ' . cf7bs_get_form_property( 'required_html' );
} elseif( 'disabled' == $mode ) {
$append .= ' disabled';
}
I changed your code a little bit, because you will not be able to display disabled radio buttons with your code. I also added a check for Contact Form 7 version 4.9 or higher, because of backwards compatibility.
many thanks! keep up the great work :D
Hi Felix,
I'm using a radio box and before v4.9 I didn't much mind if a user selected one of the options or not.
With contact-form-7 v4.9 it enforces one of the radio options must be selected, that's fine and I understand why they went that way.
Would it be possible within bootstrap-for-contact-form-7 to now automatically include required '*' to any/all radio input types?
Many Thanks, Dave