Closed nilesjohnson closed 1 month ago
Update created/modified where null
working better; let me know if you have ideas about these two remaining issues:
With multiple tags selected, only the last one is processed.
Each selected tag is listed as a separate value of the same field, like search?tag_select=ac&tag_select=cv&tag_select=dg
, and the results of $this->request->getQuery()
only show the last one. This must be the core problem, but I don't know how to access the multiple GET values, or combine the selected items into a single value.
Whatever tags are selected, they don't get autofilled into the search form The other data in the search is repopulated into the search fields (I did this manually; is there a better "cake" way?). For selected tags, I just don't know how to do it, and the previous item is a barrier anyway.
tag_select[]=ac&tag_select[]=cv
that passes an array, otherwise you're right the last one will overwrite the key val$tagstring
can be either an array or string now - but that is the easiest way to select the multiselect valsJust another note here: I will take a look at this and cleanup shortly. I think this is the way to do it:
✅ Form uses POST instead of GET
✅ Controller checks for POST, if set then processes search and just redirects to page with query string.
🤔 Why? without some management, the query string can run wild - so we clean it up on every form POST - there are other ways to avoid the redirect using JS, but they are all fiddly.
Check it now
ha ha, ok that is actually reasonable; I fiddled with it some and did some cleanups. I think it's ready?
seems good; closing!
really just a basic search by field form, like at https://mathmeetings.net/conferences/search/
One nice improvement would be to allow a query string, so that people can bookmark a search for whatever weird conditions they prefer (created or modified within certain window, location certain country, etc.). Is that easy to do?