Contact US

"width:30em;"), true); $form->removeAttribute("name"); $form->setRequiredNote(""); $form->addElement("text", "name" , "Name" ); $form->addElement("text", "emailAddress" ,"Email" ); $form->addElement("text", "message" ,"Message" ); $form->addElement("textarea", "message" , "Message", array ("rows" => 10, "cols"=>50) ); $form->addElement("submit", "sendButton" , "Send Message" ); $form->addRule ("name", "Please enter your name", "required"); $form->addRule ("name", "The name field can contain only letters, digits, spaces apostrophes and hyphens", "regex", "/^[\'\-a-zA-Z0-9]+$/"); $form->addRule ("emailAddress", "Please enter your email address", "required"); $form->addRule ("emailAddress", "Please enter a valid email address", "emailAddress"); $form->addRule ("message", "Please enter your message", "required"); $form->addRule ("message", "The message can only contain letters, digits, spaces apostrophes and hyphens", "regex", "/^[\'\-a-zA-Z0-9]+$/"); if ($form->isSubmitted() and $form->validate() ){ $form->process( "sendMessage"); } else { echo "

Please fill in all the fields below, then click Send Message to send us an email.

"; $renderer = new HTML_QuickForm_Renderer_Tableless(); $form->accept ($renderer ); echo $renderer->toHtml(); } function sendMessage ( $values) { $recipient=OWNER_FIRST_NAME . " " . OWNER_LAST_NAME . " < " . OWNER_EMAIL_ADDRESS . ">" ; $headers = "From: " . $values ["name"] . "<" . $values ["emailAddress"] . ">" . if (mail ($receipient, $values ["message"] $headers )) { echo "

Thanks for your message! Someone will be in touch shortly.

"; } else { echo '

Sorry, your message could not be sent.

'; echo '

Please go back to the form, check the fields and try again.

'; } } ?>