Welcome Guest, Not a member yet? Register   Sign In
Form Validation
#1

I have a form on an index page (controllername/)

That form does a POST to controllername/create

The form validation isĀ in the index method of the controllername class.

When the form is submitted, the validation doesn't happen.

What am I doing wrong?
Reply
#2

CI performs form validation when the form input has been posted.
So move your form validation to the create method.

A better way is to keep the code for displaying the form and performing the form validation within one method.
As described in the documentation:
https://www.codeigniter.com/userguide3/l...controller
Reply
#3

Thank you.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB