Skip to content

Instantly share code, notes, and snippets.

@jetsloth
Created March 13, 2017 09:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jetsloth/45cf9d6b17337f6eeeeef66b828719cf to your computer and use it in GitHub Desktop.
Save jetsloth/45cf9d6b17337f6eeeeef66b828719cf to your computer and use it in GitHub Desktop.
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