close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Form is not sending email and not redirecting to thankyou page

Thread began 9/18/2010 9:11 pm by denniesmit406616 | Last modified 10/21/2010 2:12 pm by Jason Byrnes | 8062 views | 52 replies |

denniesmit406616

Form is not sending email and not redirecting to thankyou page

Hi.
I am sorry if this question appears somewhere else in the forums, I searched but could not find an answer.

I followed the instructions to set up my contact form: I started with the contactus file given by this site. I added checkboxes, a little css and deleted the captcha. I changed the email address in the WA_Globals.php and uploaded everything.

The validation works fine, but when submitted it does not redirect to the thankyou page. And I am not receiving the email.

you can view my page at: contactus.php

I appreciate the help!

Danielle

Sign in to reply to this post

neilo

Hi Danielle,

Please could you zip your contactus.php & WA_Globals.php files and post them here?

Sign in to reply to this post

denniesmit406616

Hi.
I have been playing around with this, but nothing seems to work.

I tried just copy and paste the contacts.php supplied into a page of my own, but that does not redirect to thankyou and does not send email.
this page is located at:
heliskiHelitour_rates2.php

This is the new URL of the page I am trying to make work:
heliskiHelitour_rates.php

Of note: this page used to work, but now has the same bug:
contact.php

On both pages If I input something in all fields, it redirects me to the thankyou page. If I only input an email it just reloads the page. In neither instance does it send an email.

I have input the correct email address in the Globals file. And I did not change anything on my server or email provider, or any of the WA docs.

my zip files are attached

Thanks for any help

Attached Files
Contact.php.zip
WA_Globals.php.zip
heliskiHelitour_rates.php.zip
Sign in to reply to this post

denniesmit406616

Ok, I changed the email address in the WA globals file.
Now, I am getting the email! So obviously the problem was that I wasn't using an email address provided by the web host to test this.
BUT
still a problem:

I do not get any validation now. I only get redirected to thankyou and email if I fill in all fields.

If I press submit without filling out all fields it just reloads the page.

some problem somewhere with the validation?
I attached new WA globals file

Thanks!

Sign in to reply to this post

denniesmit406616

sorry here is the attachment

Attached Files
WA_Globals.php.zip
Sign in to reply to this post

neilo

Hi Danielle,

I can't see much wrong with it.

The only other thing I can see is that (in heliskiHelitour_rates.php) you may have to correct line 297 & 305, from:

<input type="text" class="inputValue" name="telephone" id="telephone" onblur="if (document.getElementById('nameServerError')) document.getElementById('nameServerError').style.display='none'" value="<?php echo(ValidatedField("contact","telephone")) ?>" />
<span class="textfieldRequiredMsg">A value is required.</span></span>
<?php
if (ValidatedField("contact","contact")) {
if ((strpos((",".ValidatedField("contact","contact").","), "," . "8" . ",") !== false || "1" == "")) {
if (!(false)) {
?>
<span id="nameServerError" class="textfieldServerError">Please provide your telephone number.</span>
<?php //WAFV_Conditional contact.php contact(1:)

to:

<input type="text" class="inputValue" name="telephone" id="telephone" onblur="if (document.getElementById(telephoneServerError')) document.getElementById('telephoneServerError').style.display='none'" value="<?php echo(ValidatedField("contact","telephone")) ?>" />
<span class="textfieldRequiredMsg">A value is required.</span></span>
<?php
if (ValidatedField("contact","contact")) {
if ((strpos((",".ValidatedField("contact","contact").","), "," . "8" . ",") !== false || "8" == "")) {
if (!(false)) {
?>
<span id="telephoneServerError" class="textfieldServerError">Please provide your telephone number.</span>
<?php //WAFV_Conditional contact.php contact(8:)



Those elements' IDs (two in line 297, one in line 304) need to be unique to validate correctly. Also replace the '1' for '8' in line 301. Can you give this a go and see what happens?

Sign in to reply to this post

denniesmit406616

Thank you for your reply.

Unfortunately it did not work. It does give me telephone validation now, it did not before.

So what happens is that it asks for telephone and email validation. But if I only fill out these two fields it does not redirect and send message.
It only does that when I fill out all fields.

Something is up with the validation?

I attached the updated version of docs.

Please help
Thanks so much!

Attached Files
WA_Globals.php.zip
heliskiHelitour_rates.php.zip
Sign in to reply to this post

neilo

Hi Danielle,

I am not currently seeing any working validation (name email telephone comment) on the linked to heliskiHelitour_rates.php page. Have you changed it? Can you revert to the status described in your last post? Ta.

Sign in to reply to this post

Jason ByrnesWebAssist

this code block at the top of the page:

php:
<?php 

if ($_SERVER["REQUEST_METHOD"] == "POST")  {
  
$WAFV_Redirect "";
  
$_SESSION['WAVT_contact_Errors'] = "";
  if (
$WAFV_Redirect == "")  {
    
$WAFV_Redirect $_SERVER["PHP_SELF"];
  }
  
$WAFV_Errors "";
  
$WAFV_Errors .= WAValidateRQ(((isset($_POST["Contact_Name"]))?$_POST["Contact_Name"]:"") . "",true,1);
  
$WAFV_Errors .= WAValidateEM(((isset($_POST["Email_address"]))?$_POST["Email_address"]:"") . "",true,2);
  
$WAFV_Errors .= WAValidateRQ(((isset($_POST["Comments"]))?$_POST["Comments"]:"") . "",true,3);
 
  
$WAFV_Errors .= WAValidateRX(((isset($_POST["addblock"]))?$_POST["addblock"]:"") . "","/^$/i",false,6);
  
$WAFV_Errors .= WAValidateRX(((isset($_POST["seconddblock"]))?$_POST["seconddblock"]:"") . "","/^$/i",false,7);
   
$WAFV_Errors .= WAValidateRQ(((isset($_POST["telephone"]))?$_POST["telephone"]:"") . "",true,8);


  if (
$WAFV_Errors != "")  {
    
PostResult($WAFV_Redirect,$WAFV_Errors,"contact");
  }
}
?>





is there to ensure that the Contact_Name, Email_address, Comments and telephone elements are filled in. The form will only send if those elements have values.

Sign in to reply to this post

neilo

Hi Danielle,

Try the attached

Attached Files
heliskiHelitour_rates.zip
Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...