Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save wmakley/80221c753e27bf5d78e60d4a437071e9 to your computer and use it in GitHub Desktop.
Save wmakley/80221c753e27bf5d78e60d4a437071e9 to your computer and use it in GitHub Desktop.
Dynamically generated credit card year dropdown for Adobe Business Catalyst
{% assign currentYear = globals.site.dateNow | date: "yyyy" %}
{% for i in (0..10) -%}
{% capture yearIncrement -%}{{currentYear | plus: i}}{% endcapture -%}
<option value="{{yearIncrement}}">{{yearIncrement}}</option>
{% endfor -%}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment