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

Validate minimum order value from a form.

Thread began 3/23/2021 1:34 am by Jonas | Last modified 3/24/2021 12:16 pm by Ray Borduin | 64 views | 6 replies |

Jonas

Validate minimum order value from a form.

I have made a simple form with WA form tool, which has two products that the user can select number from. The products have different prices.
I want the form to validate the total amount (from both products). If it is less than 100, it should not be possible to send the order and a message should say that the minimum order value is 100.
How to create this?
Since this is a common way, there should be a pretty easy way to do this - or?

Sign in to reply to this post

Ray BorduinWebAssist

You would have to write a custom javascript function to do this client-side.

Server side with Server Validations is a bit easier... you could just add the two numbers and do number validation.

Sign in to reply to this post
Did this help? Tips are appreciated...

Jonas

Unfortunately, I do not know enough javascript to write this code.
However, I have come up with a solution, but I am not happy with it. It is based on a javascript that I found, which sums the two fields in a hidden field. Then all data is sent to a confirmation page. This page retrieves the data from the first page using Form Data. Then the Show Region Utility is used, which examines whether the hidden field is below 100. In that case, an error message is displayed, and the send button cannot be pressed. The problem with this is that it requires two pages, and it feels a bit cumbersome..
How do you suggest this can be done?

Sign in to reply to this post

Ray BorduinWebAssist

With server validation, you can simply use the plus character to add two field values in php. Then use server validation to validate the result. If you attach the page I might be able to be more specific.

Sign in to reply to this post
Did this help? Tips are appreciated...

Jonas

Sure, I need all help I can get :)
The attachment is not the file I talked about above, which I am not happy with. This is created with the WA form tool.

Attached Files
ordervalueCalulationTest.php
Sign in to reply to this post

Ray BorduinWebAssist

The easiest solution is something like this

Attached Files
ordervalueCalulationTest.php
Sign in to reply to this post
Did this help? Tips are appreciated...

Jonas

This post has been deleted.

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