Field Render

Display an Image Selector field.

Field Group

Field Settings

Setting nameDescription
ImagesEnter each choice on a new line. Can be an image url or attachment ID.
Default ValueEnter each default value on a new line
Images SizeChoose the default image size
ContainerChoose the image container width, height and border size
Return ValueChoose to return form between value, array or image
Allow Null
Allow to toggle values
Select multiple values
Allow to select multiple values
LayoutChoose between the horizontal or vertical layout

Field Value

Return Format: Value

$image_selector = get_field('image_selector');

// choice1

Return Format: Array

$image_selector = get_field('image_selector');

 * array(
 *     'value' => 'choice1',
 *     'image' => '6308',
 * )

Return Format: Image

$image_selector = get_field('image_selector');

// 6308

Unformatted Value

$image_selector = get_field('image_selector', false, false);

// choice1