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

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

adding a validated field

Thread began 2/21/2010 6:49 pm by jspoerer286380 | Last modified 3/15/2010 4:56 pm by Dani Chankhour | 2192 views | 13 replies |

jspoerer286380

adding a validated field

Hi everybody... I just bought the Contact Form Solution Pack and I´m dissapointed !!

The first thing I wanted to do is to add a new field to the form but validated the same way they are in the original form and it seems is not possible if you don´t have the CSS Form builder !! I don´t remember that they warned the clients with this issue... If I knew this before i wouldn´t buy the Solution Pack.

Does anybody now if it is possible to add a validated field without having to buy another product ???

Thank You in advance,

Jorge Spoerer
CHILE

Sign in to reply to this post

Dani Chankhour

Yes. You could add spry validation to your new field. In Dreamweaver open the Insert Menu (Window -> Insert), click on the text field, and then select spry from the insert menu, and select Spry Validation Text field.

Note: Although this is not a common case, but this is a client side validation, so if the user have Javascript disabled on their browsers then the validation won't work.

Let me know if you have any other questions.

Sign in to reply to this post

jspoerer286380

reply

Thanks for your help Dani.... but I did exactly that !! (before sending my post). That gave me some client validation you are right...

But I was meaning server side validation as well... as the other fields of the form... is that possible ??

BR,
Jorge

Sign in to reply to this post

Dani Chankhour

Yes. This will require a few steps.

1. First you need to make a copy of a line 14, which is a validation for the name field and past it under line 20. And then you will need to update two things: the form element name, and the last parameter value from 1 to 7.

2. Then start by copying line 68 to 77 and pasting that under the form field you have added. Again make sure to replace the name with your form field name. If you have already applied spry validation, then you probably just need to surround the spry with line 68-72 and line 74-77.


Basically, if you use one of the already existed form elements as a starting point, and just change the form element name in the validation and add the extra line of code at the top of the page, you should be able to add server side validation to your new form element.

Sign in to reply to this post

jspoerer286380

validation issue

Thank You Dani... I will try it...

One doubt... what are those 2 input fields called "addblock" & "secondblock" the form has ??

BR,
Jorge

Sign in to reply to this post

Ray BorduinWebAssist

Those are honeypot fields. They are placed there to try to fool bots into filling them out to prevent non-human browsers from validating.
Honeypot fields are invisible fields on the form. Invisible is different than hidden. Hidden is a type of field that is not displayed for editing. Bots understand hidden fields, because hidden fields often carry identifying information that has to be returned intact. Invisible fields are ordinary editable fields that have been made invisible in the browser.

The invisibility of the honeypot fields is a key way that bots reveal themselves. Because bots do not process the entirety of the HTML, CSS, and Javascript in the form, and because they do not build a visual representation of the page, and because they do not perceive the form as people do, they cannot distinguish invisible fields from visible ones. They will put data into honeypot fields because they don't know any better.

Sign in to reply to this post

jspoerer286380

example request...

Hi Dani... it´s me again

The form is not working for me... I don´t know if I can ask you to send me a copy of the contactus.php file but with 2 additional validated fields. One the same as the "Contact_Name" and other validating numbers since i would like to use it for a phone number...

That´s all I need please,

Thank You,
Jorge

Sign in to reply to this post

Dani Chankhour

I can't really assist you with that, but if you send me your contact page (only the contact page), i will try to debug the issue on my end and tell you what you need to change exactly.

Sign in to reply to this post

jspoerer286380

file

Ok Dani, here goes the file... Is the original contactus.php of the contact form package without one security question but with 2 new fields.. one for the family name and other for a telephone number.

BR,
Jorge

Attached Files
contactus.zip
Sign in to reply to this post

Dani Chankhour

Ok, so you will just need to add these two lines of code under line 19 of your page:

$WAFV_Errors .= WAValidateRQ(((isset($_POST["apellido"]))?$_POST["apellido"]:"") . "",true,8);
$WAFV_Errors .= WAValidateRQ(((isset($_POST["telefono"]))?$_POST["telefono"]:"") . "",true,9);

And then on line 87 change the "1" to an "8" and on line 103 change the "1" to a "9".

this will give you fields server side validation, you will just need to update the text that is shown for the validation.

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