close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Errors Right Out of the Box

Thread began 9/16/2009 11:19 am by johnlanglois | Last modified 9/17/2009 3:05 pm by Jason Byrnes | 1720 views | 5 replies |

johnlanglois

Errors Right Out of the Box

I finally decided to use the Contact Form Solution Pack because I need the CAPTCHA technology for a client. Imagine my surprise when I opened the form and immediately saw errors relating to the validation aspects of the form.

Surely, it's not supposed to be like this.

I tried to give DW8 a chance to fix things and it gives an error message that says "Please select a form with WA Server Validation applied." Alas, the server validation code show to be in the form.

Am I going to have to remove all the validation and rebuild this form to get it to work?

Sign in to reply to this post

Jason ByrnesWebAssist

No, there should not be errors relating to the validation.

What where the errors?


Where you opening the page in Dreamweaver or in a web browser?

With the contact form solution pack, you will only need to edit the WA_Globals.php file, then upload everything to your web server.

Sign in to reply to this post

johnlanglois

Originally Said By: Jason Byrnes
  No, there should not be errors relating to the validation.

What where the errors?


Where you opening the page in Dreamweaver or in a web browser?

With the contact form solution pack, you will only need to edit the WA_Globals.php file, then upload everything to your web server.  



I wish that were the case.

Without opening the contactus.php file in DW8, I supplied the variables for the Globals, put the files to the testing server and got a form that looks like it could work, if only the CAPTCHA image had shown up, so that the user would know what characters to type in.

So, that's error number 1,

Upon opening the contactus.php file, DW flags all of the Validation showif fields and when I double click on those to repair them, I get the message "Please select a form with WA Server Validation Applied."

That's error #2.

When I double click on WA_Server Validations, it loads up and makes the following changes to what was supposed to have been working code.

<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$WAFV_Redirect = "";
$_SESSION['WAVT_contact_Errors'] = "";
if ($WAFV_Redirect == "") {
$WAFV_Redirect = $_SERVER["PHP_SELF"];
}
$WAFV_Errors = "";


Gets changed to :

if ($_SERVER["REQUEST_METHOD"] == "POST") {
$WAFV_Redirect = "";
$_SESSION['WAVT_contactus_Errors'] = "";
if ($WAFV_Redirect == "") {
$WAFV_Redirect = $_SERVER["PHP_SELF"];
}
$WAFV_Errors = "";

which makes things look like a session variable got renamed to reflect the file name.
Perhaps the original file was just contact.php

So at this point, I will strip all the validation out and rebuild the form.
However, I really need WA to suggest a remedy for why the CAPTCHA code is not showing up.

Also, could you explain the logic for the testing that occurs on the security question.
I may settle for just that, if I can't get CAPTCHA to work.

The validation code reads

((isset($_POST["Security_question"]))?strtolower($_POST["Security_question"]):"")

Looks for a like entry on

((isset($_SESSION["random_answer"]))?strtolower($_SESSION["random_answer"]):"")



Which gets set by a call to "WA_ValidationToolkit/WAVT_CaptchaSecurityQuestion.php"

The mystifying code in the form appears to be a client side check with

<span id="sprytextfield4">
<input name="Security_question" type="text" class="inputValue" id="Security_question" onblur="if (document.getElementById('securityServerError')) document.getElementById('securityServerError').style.display='none'" maxlength="40" />
<span class="textfieldRequiredMsg">A value is required.</span></span>



Why is that code necessary? It looks like the session var has already been set and that the validation routine would work without the client side check.

Thanks.

Sign in to reply to this post

Jason ByrnesWebAssist

If the captcha code is not appearing on the page, then the GD Library is not enabled on your PHP server.

See the "How to enable the GD Library on your Testing Server" tutorial in the how to section of the contact form solution pack support page:
contact-form/


are the contact form files at the root of Dreamweaver Site you are using?

To be able to edit the server behaviors, the files will need to be extracted to the root of your site, if they are extracted to a subfolder of your site, it will not work.

Sign in to reply to this post

johnlanglois

Originally Said By: Jason Byrnes
  If the captcha code is not appearing on the page, then the GD Library is not enabled on your PHP server.

See the "How to enable the GD Library on your Testing Server" tutorial in the how to section of the contact form solution pack support page:
contact-form/


are the contact form files at the root of Dreamweaver Site you are using?

To be able to edit the server behaviors, the files will need to be extracted to the root of your site, if they are extracted to a subfolder of your site, it will not work.  



Nice to know that code was hard wired to the root.

As far as the GD Library, my phpinfo says
"gd GD Support enabled
GD Version bundled (2.0.34 compatible)
FreeType Support enabled
FreeType Linkage with freetype
FreeType Version 2.1.9
T1Lib Support enabled
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled "

Is there a diagnostic routine I could run?


Thanks

Sign in to reply to this post

Jason ByrnesWebAssist

try loading the file that generates the captcha image directly.

The file is WA_ValidationToolkit/WAVT_CaptchaSecurityImages.php

so if go to contactus.php to get the contact for, change that to:
WAVT_CaptchaSecurityImages.php

See if you get an error message.

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