In this tutorial I’ll show you in about 30 minutes how to create a html form with the built-in FormHelper of CakePHP which automatically links up to the database fields to see what kind of input field should be generated. Further on we also check out the built-in validation options and how we can save our submitted form data to the database. And at the end I’ll explain how you can use CakePHP’s Model callback functions to put in our custom code before a CakePHP action.
In this tutorial I’ll be covering
- Create a Form via FormHelper
- Save data to the database
- Do validation on different fields with custom error messages
- Explain callbacks and use it to hash our password
- Do redirect after a save
This part is the follow-up on what we have seen in part 1 of my CakePHP basics serie!
Let me know if you enjoyed it!