close ad
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Conflict Validation Toolkit and Form Toolkit plus more.

Thread began 2/17/2011 9:02 pm by enquiry272230 | Last modified 4/11/2011 12:13 pm by enquiry272230 | 2762 views | 6 replies


Conflict Validation Toolkit and Form Toolkit plus more.

I have an email form at enquiries.php under construction.

I set up file upload and validation on file size with Validation toolkit.
All worked well.

I then decided I needed Captcha, so I bought Form Toolkit yesterday.

After applying Captcha and applying Show if (separate problem), I couldn't get the page to display due to a PHP conflict between the Validation Toolkit 2 files and the form toolkit files.
<?php require_once("webassist/form_validations/wavt_scripts_php.php"); ?>
<?php require_once("webassist/form_validations/wavt_validatedform_php.php"); ?>
<?php require_once("WA_ValidationToolkit/WAVT_Scripts_PHP.php"); ?>
<?php require_once("WA_ValidationToolkit/WAVT_ValidatedForm_PHP.php"); ?>

So I deleted the older "WA_ValidationToolkit" scripts and then the page would display.

But the show if behaviour didnt work.

On examination of the code, there was a conflict between the original file size server behaviour, and the show if server behaviour, in that the show if server behaviour setup thought that the code block from the file size server behaviour was the one to use for the show if code, despite my following setup correctly.

e.g, This is the PHP code that now enables "Show If" to work:

$WAFV_Redirect = "enquiries.php";
$_SESSION['WAVT_enquiries_Errors'] = "";
if ($WAFV_Redirect == "") {
$WAFV_Redirect = $_SERVER["PHP_SELF"];
$WAFV_Errors = "";
$WAFV_Errors .= WAValidateNM(((isset($_FILES["file"]))?$_FILES["file"]["size"]:"") . "",0,5000000,"",",.",true,1);
$WAFV_Errors .= WAValidateLE($_SESSION['captcha_Security_Code_1'] . "",((isset($_POST["Security_Code_1"]))?$_POST["Security_Code_1"]:"") . "",true,2);

if ($WAFV_Errors != "") {

The "Show if" application originally installed a second code block similar to this, containing the line: $WAFV_Errors .= WAValidateLE($_SESSION['captcha_Security_Code_1'] . "",((isset($_POST["Security_Code_1"]))?$_POST["Security_Code_1"]:"") . "",true,2);

So I had to lift this line of code, and place it in the first code block, because the "Show If" behaviour (following) expected it to be there, and delete the second code block.

<img id="capt1" src="webassist/captcha/wavt_captchasecurityimages.php?width=200&height=50&field=Security_Code_1&bgcolor=FFFFFF&transparent=1&bgimage=&gridfreq=20&gridcolor=000000&gridorder=behind&noisefreq=20&noisecolor=000000&noiseorder=behind&characters=5&charheight=&font=fonts/MYTYPE.TTF&textcolor=000000" alt="security code" width="200" height="50" /><br />
<input id="Security_Code_1" name="Security_Code_1" type="text" value="" /><br />
if (ValidatedField('enquiries','enquiries')) {
if ((strpos((",".ValidatedField("enquiries","enquiries").","), "," . "2" . ",") !== false || "2" == "")) {
if (!(false)) {
<span style="color:#F00;">Wrong Code - Try Again</span>
<?php //WAFV_Conditional enquiries.php enquiries(2:)

Now all is working fine, basically, except I have another 2 problems now.
If a user incorrectly places the captcha text in the box, the error message appears correctly, but all of the other form input dissapears and the user has to re-input.

If the above occurs, the captcha text is entered correctly, and the user later gets a "File too large" error message, the Captcha error message is also displayed.
I believe it it because the errors are stored in Sessions?

If a user incorrectly places the captcha text in the box, the error message appears correctly, and all of the other form input dissapears.
If the user leaves the page and later returns, the captcha error message is still there.

I have spent three days of unproductive time on this, due I believe to imperfect communication between the various extensions.

In order for this form to be a professional job, I need the error messages to perform better. Please assist.
At the moment, I feel like dumping webassist completely.

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





Ease of use


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