I am interested in having one view filter for two separate fields.
Example: In a staff directory I am working on, users have both a "First Name" and "Nickname" field.
The output results show both, but in order to keep it user-friendly, I would like to have a "First Name" filter that sorts by both "First Name" and "Nickname" based on the input.
I found this question on here and it seems like it gives the proper direction of what I am looking for but I am not quite sure how to execute this solution.
The suggestion based on the question above would be to expose both the "First Name" and "Nickname" filters but to hide the "Nickname" filter with CSS.
Following that, if a user typed a name such as "John" into the "First Name" filter and then clicked "Submit", before the query is executed, the input value "John" would also be automatically input into the CSS-hidden "Nickname" filter.
The concept makes sense to me but I am confused as to how to execute it.
Are there any detailed guides that could explain how I could make that happen? With the PHP code given in the question linked above, would I have to modify a core file? Would it be in a template file? Would it have to be in a module file?
Or is there an even simpler solution to this that I am not thinking about?
Any help is appreciated. Thank you!