Currently i create a select element for date input in a view like this:
echo $form->input('my_field_name', array(
'type' => 'date',
'label' => 'my_label',
'dateFormat' => 'DMY',
'minYear' => date('Y'),
'maxYear' => date('Y') + 5));
which has the following output in HTML (for the year select):
<option value="2016">2016</option>
<option value="2015">2015</option>
<option value="2014">2014</option>
<option value="2013">2013</option>
<option value="2012">2012</option>
<option selected="selected" value="2011">2011</option>
What i need is to output the years in reverse order like this:
<option selected="selected" value="2011">2011</option>
<option value="2012">2012</option>
<option value="2013">2013</option>
<option value="2014">2014</option>
<option value="2015">2015</option>
<option value="2016">2016</option>
Is there any way to get this result using the FormHelper class of Cake and without doing anything custom?
Did you take a look at the core test files?
Always a good idea to do that first before asking the community.
there you can find specific tests for this matter
etc