Last active
April 8, 2020 02:06
-
-
Save jetsloth/66f1a97297d556bb7231a729a5c3de91 to your computer and use it in GitHub Desktop.
Example markup of Image Choices with a Product Option 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 gfield_price gfield_price_x gfield_option_x 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_checkbox"> | |
<ul class="gfield_checkbox" id="input_x"> | |
<li class="gchoice_x image-choices-choice"> | |
<input name="input_x" type="checkbox" value="Choice Label|1" checked="checked" id="choice_x"> | |
<label for="choice_x" id="label_x" price=" +$ 1.00"> | |
<span class="image-choices-choice-image-wrap" style="background-image: url(path/to/your/image);"> | |
<img src="path/to/your/image" class="image-choices-choice-image" alt="Choice Label"> | |
</span> | |
<span class="image-choices-choice-text">Choice Label</span> | |
<span class="image-choices-choice-price"> | |
<span class="ginput_price"> +$ 1.00</span> | |
</span> | |
</label> | |
</li> | |
</ul> | |
</div> | |
</li> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thanks that works, i was doing a hacky way of doing it, i was doing.
in combination of hiding the .ginput_price { display:none;}