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

rating

Validation not Triggered

Thread began 7/19/2011 1:07 pm by lr_leal239405 | Last modified 7/22/2011 5:03 pm by lr_leal239405 | 2248 views | 8 replies |

lr_leal239405

Validation not Triggered

I applied server side validation to the credit card field on the Checkout form and tested it but it's not being triggered. I thought I followed the instructions correctly. What could I doing wrong? or is there a glitch I don't know about? I want to make sure it works before I proceed with all the rest. I've attached the checkout file. Thank you.

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

Jason ByrnesWebAssist

the checkout forms action is set to post to the confirm page:
<form name="ecart_checkout_form" action="confirm.php" method="post">


all form processing must occur on the forms action page


the work flow when using Server Validation when a form posts to the other page is:

On the forms action page, open the bindings panel, click the plus button and select Form Data. In the form data dialog click the folder icon and select the form page.

This adds dynamic data bindings to the bindings panel for the form.

now add the Server validation server behavior to the action page, make sure to set the failed redirect to go back to the form page.

back on the form page, add the error messages to show which fields have failed validation. Select the error message in design view, then add a Validation Show If Behavior (WebAssist -> Forms -> Validation -> Validation Show If)

in the validation show if, set the validation page to the forms action page, from the list of validations, select the validation that should trigger the error.

now select the form element, in the property inspector, click the lightning bolt next to initial value, expand the validated entries group and select the corresponding binding.

Sign in to reply to this post

lr_leal239405

Data not retained

Thanks Jason. I followed your instructions and all the form validations work fine now. The only problem I have is that when it does redirect to the checkout form, all the data that was entered is gone.

Sign in to reply to this post

Ray BorduinWebAssist

You should be able to use the Dreamweaver Bindings panel to set the values of the form elements to the "Validated Field" value. This will make the form retain its original value after validation.

Give it a try and if it doesn't work attach a zipped copy of the form page and the page with the server validation applied and I'll take a look.

Sign in to reply to this post

lr_leal239405

Bindings

Thanks....I got the bindings working and now it keeps all the data. The only ones I can't get it to keep is the data in the drop down menus. Any idea would be appreciated. Thank you.

Sign in to reply to this post

Ray BorduinWebAssist

Click the dynamic button in the select list properties panel. Then set the "initially selected" field to the validated entry just like what you did for the text fields.

Sign in to reply to this post

lr_leal239405

Menu selected value bindings

That worked great....except for one. There's the expiration month that just won't stay. I don't know what the difference between this one and the other 3 menus is but this one keeps reverting back. I compared it to the expiration year and all the code on the field itself is same (except, of course, for the selection options). What could be causing that?

Sign in to reply to this post

Ray BorduinWebAssist

Possibly leading zeros? Perhaps the list has values like "07" and when it is stored php automatically truncates that to "7". Does it work if you choose December? That would support my hypothesis.

Sign in to reply to this post

lr_leal239405

Validated Entries

Your hypothesis is correct. I left the display on the menu box with the 0's but removed the 0's from the posted values and now it works. Thanks.

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