Custom Fields
Re-Envisioned
Support MB Frontend Submission Exiting Image field delete when update

  • Creator
    Topic
  • #7597
    KwangGan
    Participant

    I just bought Life time bundle and get issue

    I have 3 image field include post thumbnail when I update all old exiting image get delete instead not change

    mb frontend / metabox last update

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

    Can you please post the code of meta box so I can check?

    Thanks,
    Anh

    #7631
    KwangGan
    Participant
    add_filter( 'rwmb_meta_boxes', 'your_prefix_register_meta_boxes' );
    
    function your_prefix_register_meta_boxes( $meta_boxes ) {
    
        $meta_boxes[] = array (
          'id' => 'post-jobs',
          'title' => 'post jobs',
          'context' => 'normal',
          'post_types' => 'jobclsf',
          'priority' => 'high',
          
          'fields' =>   array (
            array(
    			'type'             => 'image',
    			'name'             => esc_html__( 'Thumbnail 1', 'rwmb-frontend-submission' ),
    			'id'               => '_thumbnail_id',
    			'force_delete'		=> false,
    			'max_file_uploads' => 1,
    		),
    		array(
    			'type'             => 'image',
    			'name'             => esc_html__( 'Thumbnail 2', 'rwmb-frontend-submission' ),
    			'id'               => '_thumbnail_id_2',
    			'force_delete'		=> false,
    			'max_file_uploads' => 1,
    		),
    		array(
    			'type'             => 'image',
    			'name'             => esc_html__( 'Thumbnail 3', 'rwmb-frontend-submission' ),
    			'id'               => '_thumbnail_id_3',
    			'force_delete'		=> false,
    			'max_file_uploads' => 1,
    		),
            array (
              'id' => '_jobclsf_cate',
              'type' => 'taxonomy',
              'name' => 'ประเภทของงาน',
              'taxonomy' => 'jobclsf_category',
              'field_type' => 'select_tree',
            ),
            array (
              'id' => '_jobclsf_address',
              'type' => 'text',
              'name' => 'Title',
              'placeholder' => 'กรุณากรอกพิกัด หรือ ที่อยู่',
            ),
            array (
              'id' => 'jobclsf_map',
              'type' => 'map',
              'name' => 'แผนที่ปฏิบัติงาน',
              'address_field' => '_jobclsf_address',
            ),
          ),
        );
    
        return $meta_boxes;
    
    }
    #7662
    KwangGan
    Participant

    any update ?

    User both git version and wordpress version

    mb front latest

    Image still delete

    #7671
    Anh Tran
    Keymaster

    Hi, I’m still checking it. Please wait.

    #7680
    Infolu
    Participant

    Hello same problem that I’m having reported in post https://metabox.io/support/topic/problems-with-image-type-field/#post-7679

    when using the fild type “image” field my images are being deleted, this happens when using the version of metabox 4.12.5.

    Thank you for looking at this.

    #7701
    KwangGan
    Participant

    yeah problem cause by metabox latest not mb front end

    #7722
    Anh Tran
    Keymaster

    Hi,

    I’ve just fixed this bug on Github. Can you guys please try it?

    #7734
    Infolu
    Participant

    Hi Anh Tran, for me it works perfectly with the update thanks for this.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Exiting Image field delete when update’ is closed to new replies.