I'm building a contact form with the cf7 plugin for Wordpress. In this form I need a drop down menu which changes automatically every year. In the drop down menu I need to have the current and last 5 years in format 2020, 2019, 2018, 2017, 2016, 2015. That's easy to make with the plugin itself, but of course, when 2021 comes in, I would like that the drop down menu will changes automatically to 2021, 2020, 2019, 2018, 2017 and 2016. So that 2015 disappears(deleted).
Based on the code in this threat I tried to add the current year automatically, but unfortunately I'm already stuck. Hopefully someone can help me with this.
Thanks in advance. Best regards,
Vasco