Media Modal does not appear to work

Support General Media Modal does not appear to work

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #9051
    grafiknzgrafiknz
    Participant

    I'm trying to display a colour picker field on the 'Attachment Details' modal for images, does not appear to work, any ideas?

    
    $meta_boxes[] = array(
        'title'       => 'Hover colour',
        'post_types'  => 'attachment',
        'media_modal' => true,
        'fields'  => array(
            
            array(
                'name' => __( 'Hover colour', 'rwmb' ),
                'desc' => __( '', 'rwmb' ),
                'id'   => "{$prefix}image_hover_coloor",
                'type' => 'color',
            ),
    
        )
    );
    
    #9059
    Anh TranAnh Tran
    Keymaster

    Hi,

    Because of some limitation in the media modal, only simple fields such as text, select, radio, checkbox work. Other fields, including the color field, that require custom JS don't work, unfortunately.

    #9077
    grafiknzgrafiknz
    Participant

    Good to know, thanks

    Are you able to provide an exmaple on how to retrieve the media modal metabox on the front end?

    #9082
    Anh TranAnh Tran
    Keymaster

    If you're using the image_advanced in the frontend, it will include the scripts to trigger the media modal when you click on the image.

    In other cases, I'm not sure how to display the media modal alone :(.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Media Modal does not appear to work’ is closed to new replies.