Okay, there are several ways to do this. You can use client side javascript or SQL validation. But since your logic says that if $(total) > 1000000, and forces the user to not be able to submit, I will go with the SQL validation route.
1) to error trap for integers entered into the textbox fields, you will need to use REGEX validation on the textbox field (see this website url):
http://www.regexlib.com/DisplayPatt...tegoryId=3 2) under module configuration / validation, you can set SQL Validation. What you do is create a stored procedure and calling that stored procedure passing in the textbox fields and returning IsValid = 1 for allowing user to submit the form and IsValid = 0 for not allowing user to submit the form.
create procedure usp_checktotal (@box1 int, @box2 int)
as
begin
declare @Total int;
set @Total = @box1 + @box2
if @Total < 100000
select 1 as IsValid
else
select 0 as IsValid
end
Call this stored procedure in your SQL Validation area:
usp_checktotal '$(box1)','$(box2)'
Also, make sure to provide the SQL Validation error.
You could also use client side javascript and have an alert message to say that the amount exceeds and hide the submit button and if it doesn't exceed to unhide the submit button. Whichever route you choose is up to you. We could also provide custom development (
http://www.datasprings.com/Premium-Support) but it will have to be 6 hours purchase. -- David