Search code examples
cakephpinputformhelper

CakePHP's Form Helper Input vs HTML Simple Input


I'm new to CakePHP. I would like to know what are the advantages of using CakePHP's Form Helper to add input boxes in Views over simply adding HTML inputs. Which one is better way / recommended way to use?


Solution

  • If you use the Form Helper in addition to using the Security and CSRF Components your form will be protected from CSRF and other form-related attacks.

    You should definitely use the Form Helper. For more information, access this link here: http://book.cakephp.org/3.0/en/controllers/components/csrf.html

    In addition, if you use it at every instance during your learning process, you will master it quickly and it can save you time.