-
MODX Staff
- 1,535 Posts
Okay, I’m guessing the problem is that your switch statement is defaulting to the ’broken ...’ statement whenever you postback.
Remember that the switch/case is case-sensitive, so all the ’By’ words in need to be ’by’, for example: ’Search By Booth’ needs to be ’Search by Booth’
Hope that helps,
Garry
Garry Nutting
Senior Developer
MODX, LLC
Email:
[email protected]
Twitter: @garryn
Web: modx.com
Thank you garryn and sirlancelot for your replies!
garryn, you were right, the search worked just fine after correcting the cases, after combing over it for two hours, hard to believe I did not catch that, so thank you for pointing it out.
I ended up going with sirlancelot solution, and the reason is this: I need for all three buttons to be clickable, this is based on the technical "savvyness" of our users - along with an explanation, they need more of a ’graphical’ indicator. the if/elseif solution allows me to show all buttons, and the user to click any one of them, or enter text into any field and simply press Enter/Return. I had obviously not thought of that solution before.
Thanks much!