rwmb_frontend_validate still passes when $validate is a string

Support MB Frontend Submission rwmb_frontend_validate still passes when $validate is a string

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #49188
    Nicholas CoxNicholas Cox
    Participant

    Hi

    I have used the metabox front end forms for a long time and since upgrading metabox front end forms addon/extension the validation does not work anymore? it always passes. I have loads of different posts, model setups.

    e.g. shortcode
    [mb_frontend_form id="dc-product" confirmation="Your post has been successful" ajax="true"]

    add_filter( 'rwmb_frontend_validate', function( $validate, $config ) {
        // Check only if you're on the right form.
        if ( 'dc-product' !== $config['id'] ) {
            return $validate;
        }
    
        error_log(print_r($config, true));
        $validate = 'example error'; // Return false to show an error message.
        
        return $validate;
    }, 10, 2 );

    The form shows in the error logs so no issues but its stopped working for posts, models, if i force the value for $validate to be false or a string it still ignores it. No error message appears, just your 'Your post has been successful' message.

    using MB Frontend Submission v4.5.5

    thanks

    Nick

    #49191
    PeterPeter
    Moderator

    Hello Nick,

    The frontend validation filter still works well on my demo site. You can try to setup a clean environment with WordPress and Meta Box plugins to recheck this. If it works, please deactivate all plugins except Meta Box plugins, switch to a WordPress theme to troubleshoot the issue.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.