Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Example markup of Image Choices with a normal field
<li id="field_x" class="gfield image-choices-field image-choices-use-images image-choices-show-labels image-choices-layout-horizontal ">
<label class="gfield_label">Field Label</label>
<div class="ginput_container ginput_container_radio">
<ul class="gfield_radio" id="input_x">
<li class="gchoice_x image-choices-choice">
<input name="input_x" type="radio" value="Choice Value" id="choice_x">
<label for="choice_x" id="label_x">
<span class="image-choices-choice-image-wrap" style="background-image:url(path/to/your/image)">
<img src="path/to/your/image" alt="Choice Label" class="image-choices-choice-image">
</span>
<span class="image-choices-choice-text">Choice Label</span>
</label>
</li>
</ul>
</div>
</li>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment