I am building a contact form as well as a registration form to be included in a Wordpress template. So far the form is styled and the jQuery validation is working correctly. What I would like the form to do when it is submitted is do the back end validation, email the info to a set email address and then replace the form with a success message.
Can anyone recommend a good tutorial? I have googled it but I seem to be swimming in a sea of contact forms.
I used the script and it passes on the info fine but I am wondering how I can go about displaying the success or failure message on the original contact page rather than having a new page loaded.
User fills out info -> user clicks submit -> info is validated -> form disappears or fades out and is replaced by the success or failure message
if(mail($to, $subject, $message, $headers)) { $result = \"<b>Thank you</b>.<br />I will get back to you very soon.<br />\"; } else { $result = \"Sorry: An error occured, please try again later.\"; } }
I am building a contact form as well as a registration form to be included in a Wordpress template. So far the form is styled and the jQuery validation is working correctly. What I would like the form to do when it is submitted is do the back end validation, email the info to a set email address and then replace the form with a success message.
Can anyone recommend a good tutorial? I have googled it but I seem to be swimming in a sea of contact forms.
Thanks.
http://scriptplayground.com/tutorials/p ... -with-PHP/
I used the script and it passes on the info fine but I am wondering how I can go about displaying the success or failure message on the original contact page rather than having a new page loaded.
User fills out info -> user clicks submit -> info is validated -> form disappears or fades out and is replaced by the success or failure message
And replace it with something like this: