Hide elements when page loads, based on previous page button click

I have a page that is a search, add new and edit page based on the selection that is made on the page. What I am wanting to know is, is there a way that I can set the page to different states based on a button click on a different page.
For example, if I have a menu page with two buttons. New Item and Search item, which when either one is clicked, it brings up the same page, but with elements hidden or showing. So when someone clicks on the new item button, the page will open with the search bar not visible, but with a save button visible and when the click on the search button, the page loads with the search bar visible.

Is this possible, without being to complicated?

Yes, you can send parameters in the url (i.e. www.testpage.com/main?page=search) when navigating between pages.

Then on page load, you can show/hide elements based on this parameter.

I thought it would be something like that, I am just having trouble working out how it works

Now you have confirmed it I will have a better look

This topic was automatically closed after 70 days. New replies are no longer allowed.