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

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

validation failing

Thread began 6/01/2009 5:39 pm by geordie728 | Last modified 6/02/2009 3:18 pm by geordie728 | 2181 views | 10 replies |

geordie728

validation failing

for some reason on my checkout.php page (attached) my validation isn't checking for some reason.

it's quite happy to pass the data to the confirm.php page but not check that all form fields have been completed.

I've only tried to validate the billing info so far (I had everything working fine previously) so don't know what the issue is.

Any ideas appreciated.

Seems to be one step forward, 2 steps back at the minute.

Thanks,
G

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

I-CRE8Beta Tester

Your form will not validate because the form action is pointing at confirm.php, consequently the form values are passed directly to confirm.php bypassing your current validation.

You can solve this by validating your ecart_checkout_form form on your confirm.php page. To do this you need to expose the ecart_checkout_form values on confirm.php and you do this by using the Form Data option under Bindings and choose checkout.php as the page where the post is coming from then you can open up validation toolkit server behaviour as normal.

One tip make sure that on error you transfer back to checkout.php and have your error messages there rather than on confirm.php.

Sign in to reply to this post

geordie728

It was working before which is what I don't get. I'd like to get it working that way because the workflow makes sense for users.

Also if the validation is done on confirm.php then what purpose does checkout.php serve?

Sign in to reply to this post

I-CRE8Beta Tester

If it was working before you cannot have had the action of the form set to confirm.php, once the action is set the form will post it's contents to the page set in the action, if the action is blank then it will post to itself that is the way all html forms work regardless of whether they are in a php, asp or cf page.

The users do not need to know where the validation is set as if they make a mistake they will see checkout.php pop up with the validation errors you set.

The workflow is to collect the necessary info on checkout.php pass it to confirm.php if all is good display confirm.php if not bounce them back to checkout.php and display the error messages you set with validation toolkit.

There is a "completed" store in the downloads for ecart that would be worth you looking at to see how this is set-up

Sign in to reply to this post

geordie728

That's the default form action when you run the checkout wizard.

The workflow you describe is exactly how it was working before.

Customer hits checkout > if not logged in, ask them to login > display the checkout.php page and if details exist for user, display them in the form > run server validation, if validation fails then display errors, if validation passes then display confirm.php

I didn't change my approach after re-doing my checkout.php validation so I don't know why it's not working.

I had a look at the completed store but neither checkout.php or confirm.php has any server validation on it.

Sign in to reply to this post

I-CRE8Beta Tester

The validation on checkout.php will never run whilst the form action is set to confirm.php, you need to place the validation server behaviour on confirm.php for this to work as you want.

Sign in to reply to this post

geordie728

OK - if I go back to your earlier post about exposing the ecart_checkout_form on confirm.php to run server validation there, is the validation trigger set to before page load?

Sign in to reply to this post

I-CRE8Beta Tester

No you would set it to your submit button as normal

Sign in to reply to this post

geordie728

how does that work then because if you're validating the form on checkout.php via confirm.php and you're not validating until the submit button is pressed (there's only 1 on the confirm.php and that is to submit your order) then you would want to validate at that stage, not before the user hits to submit their order?

Sign in to reply to this post

I-CRE8Beta Tester

you set the validation to fire on the submit button from the form checkout.php page, once you have exposed the form as I explained earlier you will find the button in your bindings panel as normal

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