close ad
Help us test the new Databridge BETA with MySQLi support
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Fatal Error WAUE_contact_1.php on line 15

Thread began 12/07/2011 4:10 am by stuart263857 | Last modified 12/09/2011 5:18 am by stuart263857 | 3023 views | 8 replies |

stuart263857

Fatal Error WAUE_contact_1.php on line 15

I've created and uploaded a form (see here: contact.php).
When the form is filled in and submitted I get the following fatal error:

Fatal error: Call to undefined function waue_definition() in /home/strang26/public_html/woodlandcrafts.co.uk/WA_Universal_Email/WAUE_contact_1.php on line 15

Line 15 is: $WA_MailObject = WAUE_Definition("".($WAGLOBAL_Email_Server) ."","25","","","","");

I've used the ContactForm for other sites which are hosted on the same servers and they have never needed the path to the SMTP server so I can't see why this error is occurring?

The email address I'm sending the form to is my own while I'm testing it, so it's not a Woodland Crafts email - would that make any difference?

Many thanks for your help - my client is running out of patience too!

By the way, tried to post a new thread in Safari 5.1.2 on the Mac and the Image Verification window doesn't show up so couldn't send - using Firefox now.

Sign in to reply to this post

Jason ByrnesWebAssist

make sure the following code is near line 1 of the contact.php page:
<?php require_once("WA_Universal_Email/mail_PHP.php"); ?>
<?php require_once("WA_Universal_Email/MailFormatting_PHP.php"); ?>

Sign in to reply to this post

stuart263857

Thanks Jason

Checked that and re-copied from the ContactForm 103 contactus.php the first few lines and pasted into my contact.php.

Checking through the contact.php I seem to have some code from the old version of ContactForm and some from the new, so I stripped everything out and started again.

Copied everything from contactus.php apart from a few bits I didn't need and have pasted that in my contact.php.

Now the form fires but just comes back so presumably not submiting it.

I'm also getting the attached message keep coming up in Dreamweaver about the code containing a Javascript widget that no longer exists. I've attached the screenshot of the error message. Got a feeling I had this pop up before which is why I used an older version of ContactForm to create my last form.

Is the Javascript error the reason the form doesn't submit?

Sign in to reply to this post

Jason ByrnesWebAssist

the original contact form includes spry validation code at the bottom.

the error in dreamweaver is accuirng because you have not copied that code:

<script type="text/javascript">
<!--
var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "none", {validateOn:["blur"]});
var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2", "email", {validateOn:["blur"]});
var sprytextarea1 = new Spry.Widget.ValidationTextarea("sprytextarea1", {validateOn:["blur"]});
var sprytextfield3 = new Spry.Widget.ValidationTextField("sprytextfield3", "none", {validateOn:["blur"], minChars:<?php echo $WAGLOBAL_Captcha_Characters; ?>, maxChars:<?php echo $WAGLOBAL_Captcha_Characters; ?>});
var sprytextfield4 = new Spry.Widget.ValidationTextField("sprytextfield4", "none", {validateOn:["blur"]});
//-->
</script>



your form online does not contain the cpatcha form element, the form is probably not submitting because you have not removed the code to validate the captcha element:

$WAFV_Errors .= WAValidateLE(((isset($_POST["Security_code"]))?strtolower($_POST["Security_code"]):"") . "",((isset($_SESSION["captcha_1"]))?strtolower($_SESSION["captcha_1"]):"") . "",true,4);

Sign in to reply to this post

stuart263857

My online form contains the spry text at the bottom without the Captcha line and my form doesn't contain the code to validate the captcha element, so all the things you've suggested I have already done.

I've attached the code from the top of my contact.php file for you to see, if that helps.

Attached Files
Contact_top.txt
Sign in to reply to this post

Jason ByrnesWebAssist

please compress the contact page int a zip archive and attach the zip file.,

Sign in to reply to this post

stuart263857

Hi Jason

Here's the contact.php file zipped.

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

Jason ByrnesWebAssist

the server validation code has code to validate form fields that do not exist in your page:
Comments
addblock
seconddblock

if you are going to remove those form elements, you will need to also delte the following lines:
16: $WAFV_Errors .= WAValidateRQ(((isset($_POST["Comments"]))?$_POST["Comments"]:"") . "",true,3);

19: $WAFV_Errors .= WAValidateRX(((isset($_POST["addblock"]))?$_POST["addblock"]:"") . "","/^$/i",false,6);
20: $WAFV_Errors .= WAValidateRX(((isset($_POST["seconddblock"]))?$_POST["seconddblock"]:"") . "","/^$/i",false,7);

for the error in dreamweaver, if you look at the original contact form, the text boxes are created as spry form elements:

<span id="sprytextfield1">
<input name="Contact_Name" type="text" class="inputValue" id="Contact_Name" onblur="if (document.getElementById('nameServerError')) document.getElementById('nameServerError').style.display='none'" value="<?php echo(ValidatedField("contact","Contact_Name")) ?>" />
<span class="textfieldRequiredMsg">A value is required.</span></span>



your form elements are not spry form elements so the script code at the bottom is not needed.

Sign in to reply to this post

stuart263857

Thanks Jason - that did it. Amazing what problems you get if you leave the slightest bit of code in that you don't need!

Sign in to reply to this post

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...