Support

Account

Home Forums Backend Issues (wp-admin) Fields not working on Image / Attachments Details Reply To: Fields not working on Image / Attachments Details

  • Thanks for the reply! To reproduce, you just need to make a new field and assign that field group to “Attachment”. You will see the fields visible on the Add Media uploader, but when in a post, try editing an image and you will not see the fields on the Edit Image details pop-up

    Here is the export code of the field.

    if( function_exists('acf_add_local_field_group') ):
    
    acf_add_local_field_group(array (
    	'key' => 'group_57e963afdcfe3',
    	'title' => 'Photo Fields',
    	'fields' => array (
    		array (
    			'default_value' => '',
    			'maxlength' => '',
    			'placeholder' => '',
    			'prepend' => '',
    			'append' => '',
    			'key' => 'field_582226ff24d7c',
    			'label' => 'Artist / Photographer',
    			'name' => 'photographer',
    			'type' => 'text',
    			'instructions' => '',
    			'required' => 0,
    			'conditional_logic' => 0,
    			'wrapper' => array (
    				'width' => '',
    				'class' => '',
    				'id' => '',
    			),
    			'readonly' => 0,
    			'disabled' => 0,
    		),
    		array (
    			'default_value' => '',
    			'placeholder' => '',
    			'key' => 'field_5822270c24d7d',
    			'label' => 'URL for Artist / Photographer\'s Website',
    			'name' => 'photographer_url',
    			'type' => 'url',
    			'instructions' => '',
    			'required' => 0,
    			'conditional_logic' => 0,
    			'wrapper' => array (
    				'width' => '',
    				'class' => '',
    				'id' => '',
    			),
    		),
    		array (
    			'default_value' => '',
    			'maxlength' => '',
    			'placeholder' => '',
    			'prepend' => '',
    			'append' => '',
    			'key' => 'field_58222aaa2fadb',
    			'label' => 'Licensor / Distributor',
    			'name' => 'license',
    			'type' => 'text',
    			'instructions' => 'Cite the publishing house or source of image (e.g. Getty, Flickr, MOMA...)',
    			'required' => 0,
    			'conditional_logic' => 0,
    			'wrapper' => array (
    				'width' => '',
    				'class' => '',
    				'id' => '',
    			),
    			'readonly' => 0,
    			'disabled' => 0,
    		),
    		array (
    			'default_value' => '',
    			'placeholder' => '',
    			'key' => 'field_5822271f24d7e',
    			'label' => 'URL for Image Source',
    			'name' => 'photo_url',
    			'type' => 'url',
    			'instructions' => 'Link to the specific page of the image provided.',
    			'required' => 0,
    			'conditional_logic' => 0,
    			'wrapper' => array (
    				'width' => '',
    				'class' => '',
    				'id' => '',
    			),
    		),
    		array (
    			'multiple' => 0,
    			'allow_null' => 1,
    			'choices' => array (
    				'None (All Rights Reserved)' => 'None (All Rights Reserved)',
    				'Some Rights Reserved' => 'Some Rights Reserved',
    				'Public Domain Work' => 'Public Domain Work',
    				'Public Domain Dedication (CC0)' => 'Public Domain Dedication (CC0)',
    				'Attribution' => 'Attribution',
    				'Attribution-ShareAlike' => 'Attribution-ShareAlike',
    				'Attribution-NoDerivs' => 'Attribution-NoDerivs',
    				'Attribution-NonCommercial' => 'Attribution-NonCommercial',
    				'Attribution-NonCommercial-Sharealike' => 'Attribution-NonCommercial-Sharealike',
    				'Attribution-NonCommercial-NoDerivs' => 'Attribution-NonCommercial-NoDerivs',
    				'U.S. Government Work' => 'U.S. Government Work',
    				'No known copyright restrictions' => 'No known copyright restrictions',
    			),
    			'default_value' => array (
    			),
    			'ui' => 0,
    			'ajax' => 0,
    			'placeholder' => '',
    			'return_format' => 'value',
    			'key' => 'field_58222acc2fadc',
    			'label' => 'License',
    			'name' => 'image_licenses',
    			'type' => 'select',
    			'instructions' => '',
    			'required' => 0,
    			'conditional_logic' => 0,
    			'wrapper' => array (
    				'width' => '',
    				'class' => '',
    				'id' => '',
    			),
    		),
    		array (
    			'taxonomy' => 'image-tag',
    			'field_type' => 'multi_select',
    			'multiple' => 0,
    			'allow_null' => 1,
    			'return_format' => 'id',
    			'add_term' => 1,
    			'load_terms' => 0,
    			'save_terms' => 1,
    			'key' => 'field_58233eaeb75c2',
    			'label' => 'Tags',
    			'name' => 'image_tags',
    			'type' => 'taxonomy',
    			'instructions' => 'Provide rich descriptors to help search.',
    			'required' => 0,
    			'conditional_logic' => 0,
    			'wrapper' => array (
    				'width' => '',
    				'class' => '',
    				'id' => '',
    			),
    		),
    	),
    	'location' => array (
    		array (
    			array (
    				'param' => 'attachment',
    				'operator' => '==',
    				'value' => 'all',
    			),
    		),
    	),
    	'menu_order' => 0,
    	'position' => 'normal',
    	'style' => 'default',
    	'label_placement' => 'top',
    	'instruction_placement' => 'label',
    	'hide_on_screen' => '',
    	'active' => 1,
    	'description' => '',
    ));
    
    endif;