I am knew here so hi to everyone, I have been told by a friend that this site is particularly helpful so here goes. I have a form that i want to ensure is filled out correctly before the user is able to proceed. I am also advised that Javascript is the easiest way to do this, however i have no idea how to implememnt it. http://chimp.cc/start.htm If the user fails to fill out the terms and conditions box with a "Yes"when the user clicks submit, i want a message to pop up to tell them to complete it. and to return the user to that field for completion. I honestly have no idea how to do this, can someone please help me. I have attached the source code too. Cheers Andy
krakjoe.info/elp/ChimpCode.zip you need to edit the form action to put it back how it was, and also, do you not want the file to submit the form to sendmail ?
ok cheers, i just downloaded the file and opened it in firefox, tried to click the sumbmit button and the message appeared excactly as i wanted. However when it refreshes the screen it blanks out all the entered data. Also Yes what it is meant to do is populate an email with the fields from the form, I have no idea what to change within the form to get it too do what i want or what you suggested tho, so any further hep would be great thanks
how about I validate the form stuff with php ? and send the mail with php ? that would be easier for me, and better for you I think ....
seriously i need all the hlp i can get with this so if thats the easiest option then i am more than happy to go with the flow.. Many thanks
krakjoe.info/elp/ChimpHelp.phps Save it as whatever.php where whatever is your filename, I believe that does everything you need it to do @ krakjoe.info/elp/ChimpHelp.php
ok thanks again, i have the file, i have renamed it start.php uploaded it to my webspace again, chimp.cc/start.php all seems ok, lists all the fields that are not populated yet even when i enter "yes" in the box it tells me i must agree to the terms. I should get the message if it is null or "Yes" is not entered Any ideas please?
ok i have done that you wanna try it cos even if i submit the form with all fields populated i still get a message to agree to the terms chimp.cc/start.php code now starts like: <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"> p {text-align: justify; padding: 10px;} </style> <? $sysmail = "myemail@addy"; if ($_POST) {
download the above version and replace the old file, it definately works this time.... krakjoe.info/elp/ChimpHelp.phps
ok i agree that works perfectly thanks, one last question... When the user has been promted with the "request submitted etc" and there is a "ok" button which bit do i change to redirect to a different page than the start.php page lets say "chimp.cc/" cheers