Created
February 22, 2012 00:41
-
-
Save carolineschnapp/1880220 to your computer and use it in GitHub Desktop.
Extra fields for the Customizr
This file contains 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
{% assign number_of_picks = settings.pack_quantity %} | |
{% assign flavors = settings.pack_flavors | strip_newlines | replace: ' ,', ',' | replace: ' , ', ',' | replace: ', ', ',' %} | |
{% assign flavor_array = flavors | split: ',' %} | |
<table> | |
<tr> | |
<th>Flavors</th> | |
{% for i in (1..number_of_picks) %} | |
<th>{{ i }}</th> | |
{% endfor %} | |
</tr> | |
{% for flavor in flavor_array %} | |
<tr> | |
<td>{{ flavor }}</td> | |
{% for i in (1..number_of_picks) %} | |
<td><input data-label="Pick no {{ i }}" type="radio" name="pick-{{ i }}" value="{{ flavor | escape }}"{% if flavor == flavor_array.first %} checked="checked"{% endif %} /></td> | |
{% endfor %} | |
</tr> | |
{% endfor %} | |
</table> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment