View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

How to validate size and color selection

Thread began 8/16/2009 11:52 am by MJMurphy | Last modified 8/26/2009 6:13 pm by MJMurphy | 1845 views | 7 replies


Validate Selection of Colors and Sizes

I looked at your example and went back to square one but still no success with validation.

I am posting data from the product details form to the eCart. I put my validation code on the eCart page. My Validation is for a required/not blank field. If validation fails, the eCart code is supposed to redirect to the product detail page.

1) The code does not redirect back to the product detail page. I'm sure it would need to have the item id in order to redirect back to the right product but that info doesn't seem to carry over in a format I can use to call the right item - such as "product_Details.cfm?MerchID=62"

I then placed the "showif" code on the product detail page. Now when I go back to the product detail page it is always displaying the error message.

Here's the showif code on the product details page:

<cfif (ValidatedField("cart","cart") NEQ "")>
<cfif ((Find("," & "1" & "," , "," & ValidatedField("cart","cart") & ",") GT 0 OR "1" EQ ""))>
<cfif (NOT(false))>
<span class="error"><img src="../images/icons/exclamation.jpg" alt="Error!" /> Please make a selection!</span>
<!--- WAFV_Conditional cart.cfm cart(1:) --->

I also need some kind of qualifier code for the "keep shopping" button in the cart because it tries to go to the product detail page but since there is no merchid, it just displays and "item not found" message.

I'm sure both redirects (validation failure) and (keep shopping) need some kind of #cgi.query.string# but I can't seem to figure it out.

PS - since I posted this I removed the validation from the cart page and now the "keep shopping" function works - so something about the validation caused a problem with that.

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





Ease of use


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