The team now want to change the events search, so that it still has the dropdown for event category (metadata), and then a date search as a simple drop down of months, ideally starting at the current month and then select options for each subsequent month in the current year.
I have no idea how to achieve this seemingly simple request.
I’m thinking it needs to stay as an events search - so that I can keep the category filter, but is there a way, other than hardcoding in a select field, to search for all events where the start date matches just a set month?
The easiest thing I can think of is to create a metadata field with a default and non-editable value of %event_start_datetime_F% which would then print the month the event happens in. Then your search can just target that field for the month filtering?
I had that exact same thought, and set up a metadata field exactly like that!
Now just need some nifty javascript that can generate that form select field so it starts at whatever the current month is…
Thanks Bart!
C
EDIT — No, I don’t need JS, I just need some Matrix conditional keywords of course!
Check what the current date is, and only show the option for a set month if its less than the 1st of the next month. And then use a globals keyword for the year so it will work next year without recoding. Feeling pretty smug