Image select not displaying

Support MB Builder Image select not displayingResolved

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #27273
    regine@essence-design.co.uk[email protected]
    Participant

    Hi,
    I have added the image field for editors to select an image from the media library, but in both chrome and safari it comes up as a blank.

    https://share.getcloudapp.com/qGuEEPeG

    Choosing the upload function looks fine (as in the last one in this sample for Gallery) but the Homepage Image and Logo are blank when I create my post.

    Can you please help?

    Kindest regards
    Regine

    #27277
    Long NguyenLong Nguyen
    Moderator

    Hi,

    Thank you for reaching out.

    Can you please share the code that creates the custom fields? Follow this documentation to generate PHP code https://docs.metabox.io/extensions/meta-box-builder/#getting-php-code

    You can also do the step Debugging Information to troubleshoot the issue https://support.metabox.io/topic/how-to-create-a-new-topic/

    #27278
    regine@essence-design.co.uk[email protected]
    Participant

    Hi,

    here is the code it generates for one of the fields that appears blank:

    <?php
    add_filter( 'rwmb_meta_boxes', 'your_prefix_function_name' );
    
    function your_prefix_function_name( $meta_boxes ) {
        $prefix = '';
    
    $meta_boxes[] = [
        'title'  => __( 'Images', 'your-text-domain' ),
        'id'     => 'images',
        'fields' => [
            [
                'name' => __( 'Image Select', 'your-text-domain' ),
                'id'   => $prefix . 'image_select_y7qe6l7kng',
                'type' => 'image_select',
            ],
        ],
    ];
    
    return $meta_boxes;
    }

    Does that help?

    Thanks
    Regine

    #27300
    Long NguyenLong Nguyen
    Moderator

    Hi,

    The field type image_select requires options to work, please follow this documentation https://docs.metabox.io/fields/image-select/

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