Modify Custom Field in Media Library using JavaScript
One way to do it (which is probably evil) is to select the control by adding a block of javascript using the tr field of $form_fields: function set_image_data( $form_fields, $post ) { $form_fields[‘text_color’] = array( ‘label’ => ‘Text Color’, ‘input’ => ‘text’, ‘value’ => get_post_meta( $post->ID, ‘_text_color’, true ) ); ob_start(); ?> <script type=”text/javascript”> jQuery(‘[name$=”[text_color]”]’).myColorPicker(); … Read more