Fixed conditional form fields

This commit is contained in:
champsupertramp
2015-11-25 14:19:51 +08:00
parent f6a8f26d83
commit b26d81d466
4 changed files with 82 additions and 12 deletions
+2
View File
@@ -155,6 +155,8 @@
foreach( $fields as $key => $array ) {
$array = apply_filters('um_get_custom_field_array', $array, $fields );
if ( isset( $array['type'] ) && $array['type'] == 'checkbox' && isset( $array['required'] ) && $array['required'] == 1 && !isset( $args[$key] ) ) {
$ultimatemember->form->add_error($key, sprintf(__('%s is required.','ultimatemember'), $array['title'] ) );
}