I have a simple contact form I'm using for potential clients to send me their information. I'm using a simple PHP script to email the form contents, which works fine. However, what I want to do is make it so that if a disclaimer checkbox is not checked, then the email will not send, and the user will see an error message.
I don't want a dialog box or anything. What I have right now is red text that describes the error, but its default display style is set to hidden in my CSS sheet. What I'd like is for it to become visible if the checkbox is not checked, so that the user knows why the contact failed.
Additionally, I have 3 areas of the form that are marked "required." I'd also like something similar to happen if any one of them is not filled in. Like if the "Name" box has not been edited, then red text appears that says something like, "You must enter your name." or something. Obviously I'm an extreme novice, so any help is much appreciated. Thanks.