add_error msg not show
-
Here s my code in my functions.php
add_action('um_after_form_fields', array($this, 'captcha_html'), 10, 1); function captcha_html($agrs){ $mode = $agrs['mode']; //only add html to register form if($mode == 'register'){ echo '<input type="text" id="my_captcha" name="my_captcha" data-key="my_captcha" value="" />'; } } add_action('um_submit_form_errors_hook__registration', array($this, 'my_captcha_verification'), 10, 1); function my_captcha_verification($args){ echo '<pre>'; print_r($agrs); //I can see my_captcha option echo '</pre>'; if( isset( $agrs['my_captcha'] ) ){ UM()->form()->add_error( 'my_captcha', 'Captcha verification failed, please try again.'); } }
the “Captcha verification failed, please try again.” not show on the my_captcha input field, ? I don’t know why
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘add_error msg not show’ is closed to new replies.