-
1. Re: Form not working
SnakEyez02 May 5, 2011 4:28 AM (in response to quality11)quality11 wrote:
I created in DW and am in the middle of styling this contact form but can you tell me why it's not working when you click "submit"? It doesn't do anything; it should be going to this thankyou.php page. I was basing it on another site someone helped me with here.
Thanks so much for your help!
Those pages are prompting me for a username and password. Can you please provide that information?
-
2. Re: Form not working
quality11 May 5, 2011 4:31 AM (in response to SnakEyez02)Geez.....sorry. It's guest for both UN and PW.
-
3. Re: Form not working
quality11 May 5, 2011 4:45 AM (in response to SnakEyez02)Just realized....could the fact that the pages are password protected be preventing it from working?
-
4. Re: Form not working
SnakEyez02 May 5, 2011 6:38 AM (in response to quality11)It shouldn't. Let me take a look at the page and see what's going on.
-
-
6. Re: Form not working
SnakEyez02 May 5, 2011 6:57 AM (in response to SnakEyez02)Form submitted fine for me and went to the Thank You page. Just a couple of suggestions:
First, that wood pattern background behind the form makes the black text very difficult to read. The top menu in the red is a little more tolerable, but there is still not a lot of contrast between the text and background.
Second, the phone number validation. If you are going to require validation that wants things in a specific format, tell users what the format was. Only because I looked at the source code, realized it was Spry and went to the Spry documentation was I able to figure out you were looking for "(###) ###-####". This includes telling people * for required fields and tell people "Format: (123) 456-7890" or for a number just let them enter what they want and use PHP to format the number or Excel when you pull information out of the database.
-
7. Re: Form not working
quality11 May 5, 2011 7:06 AM (in response to SnakEyez02)Thanks SnakEyez02. I am still formatting....the text is supposed to be white :-0. Can't get it to work though. Not sure why. I know CSS/HMTL.
So that's strange that you got the form to work. I havne't received your form though......When I hit the "submit" button, nothing happens.
Thanks for the suggestion about telling people what format.
EDIT:...just got your form from Mickey Mouse :-). How did you get around not having to give a phone number? Also, don't get why the form won't work on my browser?
-
8. Re: Form not working
osgood_ May 5, 2011 7:08 AM (in response to quality11)quality11 wrote:
So that's strange that you got the form to work. I havne't received your form though......When I hit the "submit" button, nothing happens.
Nothing happened for me when I pressed the submit button either BUT when I removed the 'phone' form field and tried again the form was submited and went through to your thankyou.php page.
Maybe test it without the phone form field.
-
9. Re: Form not working
osgood_ May 5, 2011 7:10 AM (in response to quality11)quality11 wrote:
EDIT:...just got your form from Mickey Mouse :-). How did you get around not having to give a phone number? Also, don't get why the form won't work on my browser?
Mickey Mouse was me
-
10. Re: Form not working
quality11 May 5, 2011 7:14 AM (in response to osgood_)Oh, thanks osgood. Then, I didn't get email form from snakeyze.
How did you get the form to go through? I deleted the phone number and tried submit again and it wouldn't work.
-
11. Re: Form not working
SnakEyez02 May 5, 2011 7:14 AM (in response to osgood_)I just used "test" for everything. If it's not submittting when the phone number is entered, even in the correct format, we will need you to post the PHP code from the thankyou page here because that is the form action so that is where the processing of the form is taking place. Knowing that the phone number emtpy will allow the form to submit and be mailed, we know where to look.
-
12. Re: Form not working
quality11 May 5, 2011 7:17 AM (in response to SnakEyez02)Okay, will do.
First though......I couldn't get it to submit w/o the phone so I tried (xxx)xxx-xxxx this format and it went through to the php page.
Email isn't coming through the form and there is a Comment and a Message.
-
13. Re: Form not working
osgood_ May 5, 2011 7:19 AM (in response to quality11)quality11 wrote:
Oh, thanks osgood. Then, I didn't get email form from snakeyze.
How did you get the form to go through? I deleted the phone number and tried submit again and it wouldn't work.
Goes through great for me. I just send another email (Osgood). Have you deleted the spry validation referencing the (phone no) at the foot of the page?
Not sure you even need to validate the (phone no) because if people are 'really' interested they will provide the correct details. As you can see from the test emails I can put any old information in them if I'm not serious.
-
14. Re: Form not working
quality11 May 5, 2011 7:22 AM (in response to SnakEyez02)Snakeyz....still haven't received your email. Here's the php code from thankyou.php. Do you need the code for the form fields on the contact page too?
[CODE]
<?php
###########################################################################
# form code by : charlotteswebservices.com
# SETUP: simply change the recepients address, default email subject and thank you message$to = "klmazza@charter.net";
$subject = "Contact Equinection";
$thankyoumessage = "Thank you for contacting Equinection. Your message has been sent. We will get back to you as soon as possible.";###########################################################################
# strip any html or code tags for security
function clean($str) {
strip_tags(chop($str));
return $str;
}# prevent remote scripts from executing the form
$action = (int) $_POST['action'];if($action) {
# get posted fields
$name = clean($_POST['name']);
$email = $_POST['email'];
$phone = clean($_POST['phone']);
$workshop = clean($_POST['workshop']);
$comment = clean($_POST['comment']);
$from = "$name";
$from_em = $_POST['email'];
$theirmessage = clean($_POST['message']);
$ds = "\r\n\r\n";
# prepare posted information for the email
$message = <<< NONEName : $name $ds
Phone : $phone $ds
Workshop : $workshop $ds
Comment : $comment $ds
Message : $ds$theirmessage
NONE;
# To send HTML mail, the Content-type header must be set
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";# Additional headers
$headers .= "To: $to \r\n";
$headers .= "From: $from <$from_em> \r\n";# Mail it!
@mail($to, $subject, $message, $headers);# format final messages to display to visitor
$thankyoumessage = $thankyoumessage . "<br><br><a href=\"/\">Go To The Home Page</a>";
$MSG = "<p class=\"contactthanksmsg\">$thankyoumessage<p>";
} else {
#tried to submit from from remote script
$MSG = "<p class=\"contactthanksmsg\">Thank you for contacting us. We'll be in touch soon....<br />
Click here to go back to the <a href=\"index.html\">Contact page</a>.<p>";
}?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/default.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="head" -->
<title>Equine Assisted Learning | Leadership Development</title>
<meta name="Description" content="Equine Assisted Learning from an Epona approved instructor offering programs on leadership development, personal growth, and enhancing recovery near Asheville, NC." />
<meta name="Keywords" content="equine experiential Learning,equine facilitated learning,intuitive horsemanship,self-discovery with horses" />
<meta name="author" content="" />
<meta name="copyright" content="2011 Equinection.org, Equine Assisted Learning | Equine Facilitated Learning near Asheville, NC" />
<meta name="revisit-after" content="14 days" />
<meta name="google-site-verification" content="gGLIFvID8iZkZ8GJ_ZmjaJF-CXjrT7JjdqkwWLpWqMg" />
<meta name="y_key" content="f06d2791d98aac04" />
<link rel="canonical" href="http://www.equinection.org/" />
<link href="../css/default1.css" rel="stylesheet" type="text/css" /><style type="text/css">
</style>...................
And so on with html....
-
15. Re: Form not working
quality11 May 5, 2011 7:28 AM (in response to osgood_)Got the second one again too. So remove the required and it should work?
I have to run out for an hour or so. I'll be back as soon as possible to pick back up this conversation. Thank you both for your help!!
-
16. Re: Form not working
osgood_ May 5, 2011 8:04 AM (in response to quality11)quality11 wrote:
Got the second one again too. So remove the required and it should work?
We'll that's what I would do.
I think the issue obviously lies with the 'required input' of the phone no field and the contact page is not even submitted to the thankyou.php page. whilst that error exists.
Snake may have a different view as he is much more familiar with php than I ever will be. It's not my area of expertise............that's drinking beer
If you decide to go down the route of NOT requiring the phone no field to be filled in then just remove the below from the <script> you'll find at the bottom of your page:
var sprytextfield3 = new Spry.Widget.ValidationTextField("sprytextfield3", "phone_number");
-
17. Re: Form not working
SnakEyez02 May 5, 2011 8:26 AM (in response to osgood_)The source of the problem does not seem to be a PHP issue. The code there is fine. It appears to be an issue with the Spry validation not passing information because it thinks it's not valid even though it may be.
I found a couple people with your similar problem who posted this in the Spry forum. Many of the suggestions suggest manually forcing the validation by adding "OnSubmit" to your <form> or adding the
"validateOn:["change"]" to the end of the javascript at the bottom of the page: (example - http://labs.adobe.com/technologies/spry/demos/formsvalidation/source.html ).I think I'm going to have to side with osgood on this one that the Spry validation on the phone number may require more work than what it's worth. I'll take another look at it in a bit (taking a break from it always clears up perspective), but I think I'm going to err on the side of caution on this one and say it's probably overkill for the form.
-
18. Re: Form not working
quality11 May 5, 2011 2:42 PM (in response to SnakEyez02)Guys, thank you sooo much for taking the time to help. I removed the spry/required from phone and it's working! Yeah.....!! Which fields do you recommend be required?
I just noticed that the "To" field of the email sent by the form lists my email address twice (example@example.com; example@example.com) . Is that something on the thankyou.php? I don't receive 2 emails though.
Any idea why the top text over the wood won't show up white? I have .form. label, .form p and left p set to the white.
And lastly...not sure how to se the <label> property so the 4th field won't wrap the text into 3 lines. How can I style that so it will wrap on 2 lines only?
-
19. Re: Form not working
osgood_ May 6, 2011 3:33 AM (in response to quality11)quality11 wrote:
I just noticed that the "To" field of the email sent by the form lists my email address twice (example@example.com; example@example.com) . Is that something on the thankyou.php? I don't receive 2 emails though.
Try removing $headers .= "To: $to \r\n"; from the php script on your thankyou.php page:
# Additional headers
$headers .= "To: $to \r\n";
$headers .= "From: $from <$from_em> \r\n";quality11 wrote:
And lastly...not sure how to se the <label> property so the 4th field won't wrap the text into 3 lines. How can I style that so it will wrap on 2 lines only?Add some inline css to the <p> tag as below to declare a width:
<p style="width: 200px;"><span id="sprytextfield4">
In reference to the text over the wood image again just add some inline css for that:
<p style="color: #fff;">To contact us, please type your information in the fields below and we will reply soon:</p>
-
20. Re: Form not working
quality11 May 7, 2011 4:03 AM (in response to osgood_)Cool. Thanks Osgood!!



