View Single Post
  #5  
Old 08-17-2015, 12:21 AM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: how to create a form and add it to a page?

Yes, you're right regarding the form id. X-Cart 5 signs most of the forms in the back-end and some of the forms in the storefront to prevent hackers from submitting malicious data in these forms.

\XLite\Controller\AController::needFormId() static method defines whether the controller class requires forms to be signed, or not. For back-end pages it always return "true", so all back-end forms are protected out of the box.

There is one more method: \XLite\Controller\AController::defineFreeFormIdAct ions(). It defines a list of controller actions that should bypass the form id checking. If you want your action to skip the form id check, you should find the controller that handles the form and add the name of the action to the list generated by this method of that controller class.
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote