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

How to add validation to select list in DataAssist form

Thread began 1/25/2017 2:07 pm by tmcbinc99963 | Last modified 1/30/2017 5:52 pm by Ray Borduin | 651 views | 12 replies |

tmcbinc99963

How to add validation to select list in DataAssist form

I've added a 'state' select list to a DataAssist Form Builder form, with Server Validation and Show if through the wizard, but it isn't validating.

I have another select list in an eCart page which has validation code for each 'state' entry. The new form doesn't have that and it doesn't seem to be added by the wizard.

Also looked at a WA tutorial, but it doesn't go into enough detail to pull it off.

Sign in to reply to this post

Ray BorduinWebAssist

I'm a bit confused. It looks like your State select list would always have a State selected. How would anyone not have a state selected so that the validation would fail? Do you have a sample URL I can look at?

Sign in to reply to this post

tmcbinc99963

I've added a 'select a state' option. City or State select list now doesn't show up. I added display errors text on the local site, but doesn't show any errors.

Live view in PM.

Sign in to reply to this post

Ray BorduinWebAssist

Please attach a copy of the page and I can see what might be wrong.

Sign in to reply to this post

tmcbinc99963

File attached.

Also, I need to create a 'careers' form with many of the same fields. Can I 'save as' this page to use, and would I need to copy all the included files also? Would it be easier to start from scratch with a new form in Form Builder?

Sign in to reply to this post

Ray BorduinWebAssist

You have put the validation show if server behavior around the entire select list. It should be placed around a message like "This field is required" placed after the select list.

Sign in to reply to this post

tmcbinc99963

That's fixed, but get the following error on submit:

Warning: Cannot modify header information - headers already sent by (output started at /home/devadmin/public_html/test.primrose.com/ContactUs.php:4) in /home/devadmin/public_html/test.primrose.com/webassist/form_validations/wavt_scripts_php.php on line 85

Also, I need to create a 'careers' form with many of the same fields. Can I 'save as' this page to use, and would I need to copy all the included files also? Would it be easier to start from scratch with a new form in Form Builder?

Sign in to reply to this post

Ray BorduinWebAssist

You have a blank line of code on the top of the page between the php tags. You need to remove that and the error should go away.

Sign in to reply to this post

tmcbinc99963

On submit, the form now reverts back to the same page, with a Name validation error, like I haven't entered a name, though the name is there.

Sign in to reply to this post

Ray BorduinWebAssist

Your identifiers in your server behavior are set to "1" for city and state validation as well as first name. They should match the identifiers in the show if validation for those fields which are "6" and "7". You must have copied and pasted to add those rows.

Another mistake that you made is that you are validating the field "State" but the field name is "SelectState". That is the validation that is actually failing.

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