I have an issue – I have a fulltext form and it's action URL is:
/?do=fulltext_fulltextForm-form-submit. Everything works OK. But
when I copy this URL to browser and send it as GET request, nothing happens.
Obviously, there are no POST data to handle. But I don't want URL like this to
be accessed via GET request, so I'd like to redirect it or throw 404 or
something like this.
But I have no idea where I can do this. Form's success method is not triggered. Is sany method trigerred when it happens and where I can handle it?
Thanks for any help :)
- Member | 504
It would be interesting to know how you got the url with /?do=… because it's a url of a submitted form.
Is it that you want this gone after you submit a form? The solution is to redirect with $presenter->redirect() after having processed the form. The most important reason for redirecting actually, is to avoid repeated submissions on refresh or traversing browsing history.
No no, I don't have this URL in link and of course I redirect after
submitting form. But there is a fear that search engines crawl links in
action attributes as well. And this URLs should not be displayed in
Google … I know, it's a paranoic and makes no sense but it's not up to me
… I'm just programmer :D