Choice Callback – UM class validation error
-
Dear Support,
I use the UM Form choice callback function defined in my functions.php in my registration form.
function return_choices(){ $list = array( 'one', 'two', 'three' ); return $list; } add_action( 'init', 'return_choices' );
After submitting the form I get two errors in my console (both the same exept one is class-validation.php:81 and one class-validation.php:89)
content.js:43 E_NOTICE Undefined index: form_id - /app/public/wp-content/plugins/ultimate-member/includes/core/class-validation.php:81 #18 /app/public/wp-includes/class-wp-hook.php:286 - um\core\Validation->validate_fields_values(Array[12], Array[39]) #17 /app/public/wp-includes/plugin.php:208 - WP_Hook->apply_filters(Array[13], Array[2]) #16 /app/public/wp-content/plugins/ultimate-member/includes/core/class-user.php:1016 - apply_filters('um_before_save...', Array[13], Array[39]) #15 /app/public/wp-content/plugins/ultimate-member/includes/core/um-actions-register.php:59 - um\core\User->set_registration_details(Array[13], Array[39]) #14 /app/public/wp-includes/class-wp-hook.php:286 - um_after_insert_user(163, Array[39]) #13 /app/public/wp-includes/class-wp-hook.php:310 - WP_Hook->apply_filters('', Array[2]) #12 /app/public/wp-includes/plugin.php:465 - WP_Hook->do_action(Array[2]) #11 /app/public/wp-content/plugins/ultimate-member/includes/core/um-actions-register.php:452 - do_action('um_user_regist...', 163, Array[39]) #10 /app/public/wp-includes/class-wp-hook.php:286 - um_submit_form_register(Array[39]) #9 /app/public/wp-includes/class-wp-hook.php:310 - WP_Hook->apply_filters(NULL, Array[1]) #8 /app/public/wp-includes/plugin.php:465 - WP_Hook->do_action(Array[1]) #7 /app/public/wp-content/plugins/ultimate-member/includes/core/class-form.php:411 - do_action('um_submit_form...', Array[37]) #6 /app/public/wp-includes/class-wp-hook.php:286 - um\core\Form->form_init('') #5 /app/public/wp-includes/class-wp-hook.php:310 - WP_Hook->apply_filters(false, Array[1]) #4 /app/public/wp-includes/plugin.php:465 - WP_Hook->do_action(Array[1]) #3 /app/public/wp-includes/template-loader.php:13 - do_action('template_redir...') #2 /app/public/wp-blog-header.php:19 - require_once('/app/public/wp...') #1 /app/public/index.php:17 - require('/app/public/wp...')
Everything works but the errors show up.
It looks like your code dont like choice callback options that are somehow not defined in wp_options table?
(class-validation.php – beginning line 76)//validation of correct values from options in wp-admin ... if ( in_array( $fields[ $key ]['type'], array( 'select' ) ) &&
Or is there anything I miss in my code?
Thank you!!
Regards,
Patrick
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Choice Callback – UM class validation error’ is closed to new replies.