Open lemmon opened 5 days ago
This is a tricky one.
I decided to use the referer URL, because the form should work on any rendered route (in case you don't have the #101 issue) - if we use the page UID there might be issues where the redirect does not work, e.g. when you have a param attached to the URL or you simply use a route to render the page (where most people don't override the url()).
I figured it would be perfectly fine if the Referer Page is empty, it's only used in the Email action anyway.
Generally I avoid routes in my projects where I use a custom URL like that (e.g. vierbeinerinnot.de) - instead I use virtual pages, since there are other Kirby plugins such as Staticache incompatible with routes as well.
Yes, I agree. I tend not to use custom urls as well. But when client asks... you know how that goes.
I have page with custom masked url:
In such case
findRefererPage()
is not able to find referer page. I see two options: A) Iterate over all of the pages and match url with http referer url (probably far from efficient approach) or B) Insert referer page uuid within submitted form data. The later might resolve #101 too.