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

Help with form validation

Thread began 4/22/2009 2:18 pm by Brainthief | Last modified 4/24/2009 9:33 pm by Ray Borduin | 3616 views | 15 replies |

Brainthief

Help with form validation

I think my problems posted in the two threads below are the same:
showthread.php?t=613
showthread.php?t=644

I think my form is not posting to the correct page.

I added server side form validation to checkout.php with the form action posting back to checkout.php to preform the validation...
Validation is working fine. My rules are working as they should.

The problem is in moving on the the confirm page...

Where on the validation page (checkout.php), after validation, does the page get sent on to confirm.php?

Sign in to reply to this post

Ray BorduinWebAssist

Change the form action back to go to the confirm page and copy and paste your validation code from the top of the checkout page to the top of the confirm page and you should be good to go.

Sign in to reply to this post

Brainthief

I see...
I think that's what I needed!
Thanks Ray...

Sign in to reply to this post

Brainthief

That looks like what I needed to know, but...
I'm using a template system and I'm calling my pages like this:
index.php?page=checkout

If a user inputs something wrong on the index.php?page=checkout form,
it goes to index.php?page=confirm where it fails validation.
It should send the user back to index.php?page=checkout to correct the fields, but it sends the user back to index.php?page=Checkout&page=Confirm

This sends the user on to the confirm page which is wrong.
How do I keep it from adding &page=confirm to the query string?

Thanks!

Sign in to reply to this post

Ray BorduinWebAssist

On the page WAVT_Scripts_PHP.php it has code that automatically adds querystring variables to the end of the url. It is on lines 64-70. You could probably comment out that code, or better yet create a copy of the function and add it to your page so that you can comment out a local version and don't need to update the central include.

It is sometimes necessary to maintain the url parameters on update pages, so it is done automatically. I hesitate to have you remove it from the global function in case you ever use validation on an update page. Also reapplying the server behavior would overwrite the file.

Sign in to reply to this post

Brainthief

I see!
That's what I needed to know
Again Ray, Thank you.
I appreciate you working with me on this.
I think I'm moving forward now!

Sign in to reply to this post

Brainthief

Alright, maybe another easy one.
I'm not getting a "stop" at confirm.php page...
Everything seems to be working with UPS and Paypal but after validation, it rolls right on to checkout_success.php.
I see the order in the database.
Shouldn't the process stop at confirm.php so the user can click the "Submit Order" button, then continue on to checkout_success.php?
Thanks!

Sign in to reply to this post

Ray BorduinWebAssist

Yes it should. Perhaps you are using the "any form submit" trigger to insert the order and process the transaction, so the submit from the checkout page immediately triggers the insert without confirmation. That is one possible cause of what you describe.

Sign in to reply to this post

Brainthief

Yes, you are correct - I have any form post selected.
I got tis from the docs;
"Any Form Post: Any form posted to the page that the server behavior is applied to will trigger validation. This is typically used when a form on a different page is submitted to the page for validation."

I tired all of the other choices in the drop drop down and got the same results.

I checked the dynamic options but was not sure where to start...

Can you tell me which option I should choose?

Thanks!

Sign in to reply to this post

Ray BorduinWebAssist

Use the button press trigger event that triggers based on the name of the button used to submit the form and make sure the button names on your checkout and confirm page are not the same. That way you can differentiate when each server behavior triggers.

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