Custom Fields
Re-Envisioned
Support MB Frontend Submission Image Upload Not Shows uploaded images on edit form

  • Creator
    Topic
  • #15842
    Resolved baraanajjar@gmail.com
    Participant

    Hi support
    i am using Image upload in frontend form it not shows uploaded images on edit form while other values are showing

    array(
                    'id'               => 'gallery_upload',
                    'name'             => esc_html__( 'Image Upload', 'your-prefix' ),
                    'type'             => 'image_upload',
                    'admin_columns' => 'before title',
                    //'required'   => true,
                    // Delete image from Media Library when remove it from post meta?
                    // Note: it might affect other posts if you use same image for multiple posts
                    'force_delete'     => true,
                    // Maximum image uploads
                    'max_file_uploads' => 5,
                    // Display the "Uploaded 1/2 files" status
                    'max_status'       => true,
                ),

    please check thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Author
    Replies
  • #15868
    Anh Tran
    Keymaster

    Hi, are you using the latest version of MB Frontend Submission?

    #15879

    is the latest version has fixed this problem. last time you suggested that i should validate form before saving. as i added following code

    add_filter( 'rwmb_frontend_validate', function( $is_valid, $config ) {
        if ( 'meta-box-id' !== $config['id'] ) {
            return $is_valid;
        }
        if ( empty( $_POST['image_upload_field'] ) ) {
            $is_valid = false;
        }
        return $is_valid;
    }, 10, 2 );
    #15883
    Anh Tran
    Keymaster

    Great. So everything is fine now. I’ll mark this topic as resolved!

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