Re-direction using site.yaml

Hi, I’m new to Grav, always looking for new tech…
I have installed and tested, it looks great, is fast, I like that, it could be great if we can use blade engine.
Any way, I have installed and have some basic pages, home, blog, services, gallery, contact and a basic survey, with just: name, email, phone, comments, and rating radio btn’s…

To get to this page /survey with a get request I’m using other pages…
/other-page has only name and email when user clicks [Continue] he/she is redirected to the page /survey?name=Llilu+lili&email=lili@foo.com
using javaScript I capture this params and put them in their correct inputs, after that I clear the URL and the user can continue answer my survey…
Up to this point everything works great! but the link to this /survey it visible in the menu I could hide it with CSS but want to know if is possible to do…
Question: Using site.yaml how can I redirect a user from /survey if the user got there without the parameters required? which is this case are ?name&email …

To hide the page survey in the menu set the frontmatter variable visible to false. You can do that in the page frontmatter (often called the page header) like this:

visible: false

Or you can set it via the Admin panel when editing the page there.

You can create a conditional redirect through advanced routing and using a regular expression, see Redirects and the section above it about Regex-Based Aliases.