Created
March 13, 2017 09:51
-
-
Save jetsloth/45cf9d6b17337f6eeeeef66b828719cf to your computer and use it in GitHub Desktop.
Example markup of Image Choices with a normal field
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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