Created
January 24, 2014 15:26
-
-
Save Patrick64/8599436 to your computer and use it in GitHub Desktop.
Example of using a list of links instead of textboxes for the number range
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
{number_range_groups} | |
<h3>{label}</h3> | |
<form method="post" class="number_range" id="{group_name}_form" > | |
{filters} | |
<input type="hidden" name="XID" value="{XID_HASH}" /> | |
<input type="hidden" name="{group_name}_min" id="{group_name}_min" value="{filter_min_value}" /> | |
<input type="hidden" name="{group_name}_max" id="{group_name}_max" value="{filter_max_value}" /> | |
<ul> | |
{if filter_min<5} | |
<li><a href="#" onclick="{group_name}_min.value=0;{group_name}_max.value=5;{group_name}_submit.click();return false;">under $5</a></li> | |
{/if} | |
{if filter_min<10 AND filter_max>5} | |
<li><a href="#" onclick="{group_name}_min.value=5;{group_name}_max.value=10;{group_name}_submit.click();return false;">$5 - $10</a></li> | |
{/if} | |
{if filter_min<20 AND filter_max>10} | |
<li><a href="#" onclick="{group_name}_min.value=10;{group_name}_max.value=20;{group_name}_submit.click();return false;">$10 - $20</a></li> | |
{/if} | |
</ul> | |
<input type="submit" name="submit" value="Go" id="{group_name}_submit" style="display:none;" /> | |
{/filters} | |
</form> | |
{/number_range_groups} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment