See my form here: https://www.onlineprayerguy.com/
add_filter('frm_validate_entry', 'check_category_fields', 10, 2);
function check_category_fields( $errors, $values ) {
if ( $values['form_id'] == 2 ) { // change to your form id
$group_fields = array(35, 36); // change to the ids of your fields
foreach ( $group_fields as $field_id ) {
if ( $_POST['item_meta'][$field_id] != '' ) {
return $errors; // do not continue checking if any of these fields have a value
}
}
foreach ( $group_fields as $field_id ) {
$errors['field'. $field_id] = 'Please fill in one of the category fields.';
}
}
return $errors;
}
5. What can I do to cause the filter to run the validation when the user selects the next submit button instead of firing when the step loads?