How do I reset all form fields in a view when I refresh the page in CakePHP?
2 answers
Are you asking how to make Cake not automatically place data on forms by using the form helper inside the view? If so, Cake simply takes the data inside the Controller :: $ data and uses the appropriate array indices for the field names to populate those fields. To stop this, just set $ this-> data = null; in your controller action corresponding to the view.
+4
source to share