rwmb_frontend_validate for cloneable groups issue with set_post_data

Support MB Frontend Submission rwmb_frontend_validate for cloneable groups issue with set_post_data

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #48545
    Nicholas CoxNicholas Cox
    Participant

    Hi,

    When using rwmb_request()->set_post_data( $_POST ); when manipulating field values for cloneable groups during form validation, if you leave the clone empty or set any number of group clones then there is always an extra empty clone field saved to the database. I assume the cleanup operation for the forms cloneable groups is not removed before the post is created when using rwmb_request()->set_post_data( $_POST );?

    add_filter( 'rwmb_frontend_validate', function( $validate, $config ) {
    	//update clone fields then...
    	rwmb_request()->set_post_data( $_POST );
        return $validate;
    }, 10, 2 );

    ref: https://support.metabox.io/topic/rwmb_frontend_validate-and-update-_post-value

    im using the latest versions of all plugin extensions and have tested and checked my setup, no errors in php logs

    thanks

    Nick

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.