It is necessary to hide elements that have a year less than the current year in the data-value , as it can be done. The php is not very strong. It is advisable to do inside the call. value substitutes year
{% for value, string in form.ccYear %} <a href="#" data-value="{{ value }}">{{ string }}</a> {% endfor %}