Support

Account

Home Forums General Issues images as choices in select field Reply To: images as choices in select field

  • @hube2
    I created a custom post 1, added ACF fields (image name and image to return image URL).
    Then on the ACF fields groups of another custom post 2, I selected Post Object field to return ID then…. On the Add New post of the Custom Post 2, i get a drop-down (select field) of the ACF fields meant for custom Post 1.

    On the public page, I used the exact code as above and I get the image correctly.

    $iconImage = get_field('icon_image', $section['icon_selector']);
    ---
    <img src="<?php echo $iconImage; ?>" alt="<?php get_field('icon_name', $section['icon_selector']); ?>">

    My challenge is the Drop Down/Select on the custom post 2 to select the image. It only shows the title of the record saved in custom post 1. How can I make this select field show image also?

    `