Radio Buttons not working
-
This is a continuation of https://wordpress.org/support/topic/checkboxes-and-radio-buttons-not-working?replies=7.
I switched to twenty-fifteen as per your last suggestion and the problem still occurs. Since my form was rather lengthy, I created a simple form
[radio radio-324 "one" "two" "three"] <p>[submit "Send"]</p>But still the problem persisted… It would allow submit without ANYTHING being selected.
I only have ONE plugin “Contact Form 7 ” v 4.2.1
WP 4.2.2 on twenty-fifteen theme.I started investigating the validation process, and here is what I found.
I think the problem is in checkbox.php in function wpcf7_checkbox_validation_filter.if ( $tag->is_required() && empty( $value ) ) { $result->invalidate( $tag, wpcf7_get_message( 'invalid_required' ) ); } return $result;For a radio button, there is not a is_required object, and since you are using an “AND” the empty value does not apply. So it just does not do any validation against the [type]=>radio
The topic ‘Radio Buttons not working’ is closed to new replies.