How to set a maximum calculation amount with conditional logic on form