I am looking to customize my 404 page by displaying a small form only when the visitor comes from a website, not from an email link or directly entering the URL. The purpose of this form is to address broken links that led the visitor to the error page. If the visitor reached the page through an email link or by directly typing the URL, there is no need for the form as there is nothing to correct. However, if they landed on the page from another website, I want the form to be visible.
I have considered using the Javascript referer_url option, but I am wondering if there is a way to hide the form when the visitor has no referer_url value?
Any suggestions would be greatly appreciated. Thank you.