Nati Mask Posted January 20, 2016 Share Posted January 20, 2016 (edited) I have successfully created my custom back office page. In that page I want to have a form, which will update data using the same admin controller showing that page. (This is a common case in the prestashop core admin controllers, isn't it?) When I access the page from the menus (which accessed via "GET" http method) all's working fine, but when the form is submitted ("POST" http method) I'm getting redirected to my back office dashboard. I put the form action url in the smarty template for the page like that: <form action="index.php?controller=myclass&token={Tools::getAdminTokenLite('myclass')}"> As you can see 'myclass' there is the class name as shown in the working (get) url as a value for the "?controller=" url variable. I guess it have something to do with the token in url, but maybe I missing here the correct approach to forms submitting at admin controllers? Thanks in advance! Edited February 3, 2016 by Nati Mask (see edit history) Link to comment Share on other sites More sharing options...
Nati Mask Posted February 3, 2016 Author Share Posted February 3, 2016 Sorry, I had a mistake there, I've misunderstood the routing between form post and controller actions. Marking as solved Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now