Display error when entire form is blank in CodeIgniter

Posted by Joe on Stack Overflow See other posts from Stack Overflow or by Joe
Published on 2009-12-02T21:33:11Z Indexed on 2010/04/19 18:03 UTC
Read the original article Hit count: 190

Filed under:
|
|

I'm trying to create a fairly simple form that has a few checkboxes and input fields and a textarea. Nothing is required by itself; however, if 'A' checkbox is checked, then 'A' input field is required (and so on for the couple other checkboxes I have).

I have the above functionality in place, but I'm having a tough time figuring out how to have an error returned if the form is submitted blank (since nothing is required by default).

Does anyone know of an easy-ish solution for this? It seems like it should be so simple...

Thanks

© Stack Overflow or respective owner

Related posts about codeigniter

Related posts about php