close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Checkbox Validation using Spry in ContactForm Solution Pack

Thread began 3/31/2010 2:05 am by Groshko | Last modified 4/01/2010 11:20 am by Groshko | 2856 views | 4 replies

neilo

Cheers Jason, thanks for all the info (At some point you may need to start billing me for it all).

I was looking into the onsubmit part of the form tag (I had some vague memory of s script I picked up somewhere, having forgotten about Spry altogether) and eventually

found it - also containing javascript - but that script worked by disabling the submit button until the 'I accept the terms and conditions' checkbox had been ticked.

I thought it might help Groshko a bit, but suppose that's probably only effective in conjunction with serverside validation too. I attach the instructions anyway.

---------------------------------------------------------------------------------------

Hiya Groshko,

I may be wrong, but I believe that having a few of the server error elements with the same name (nameServerError) might cause you problems with the serverside

validations and the error messages on the page . I believe that each $WAFV_Errors (as listed in the block of WA Server Validations near the beginning of your page)

should refer to a uniquely named server error elements. (I think the 'nameServerError' originally just applied to the 'Name' field).

So for instance, in line 15 in the contact_php file:

$WAFV_Errors .= WAValidateRQ(((isset($_POST["Address"]))?$_POST["Address"]:"") . "",true,2);


refers to an input 2, which is the Address input field so perhaps in that block you could change the references to 'nameServerArea' to 'AddressServerError', i.e:

<span id="sprytextarea1">
<textarea name="Address" class="inputText" id="Address" onblur="if (document.getElementById('AddressServerError'))

document.getElementById('AddressServerError').style.display='none'" ><?php echo(ValidatedField("contact","Address")) ?

></textarea>
<span class="textareaRequiredMsg">A value is required.</span></span>
<?php
if (ValidatedField("contact","contact")) {
if ((strpos((",".ValidatedField("contact","contact").","), "," . "3" . ",") !== false || "3" == "")) {
if (!(false)) {
?>
<span id="AddressServerError" class="textfieldServerError">Please enter your address here.<br />
</span>
<?php //WAFV_Conditional contact.php contact(2:)
}
}
}?>


---------------------------------------------------------------------------------------

Attachment is the bit of 'diable button' code from Dynamic Drive.

Attached Files
Accept terms before submitting form - DD.txt

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