compare 2 numbers and error user if they aren’t close

[ad_1]

Hi,

I’m building a form in cff. In a specific part, the users have to enter the sides and area of a space. FYI, this area is the accurate one gonna be used in future calculations. but I need an error for the case they make mistake. for example they enter 6 & 10 as sides but 600 as area. So i have to calculate the area with a tolerance of 3% myself to double check.

The problem is I don’t know how to define the error. if the entered area is close to my calculation, the process should go on, but if it’s not, I need to stop the process and ask the user to check his numbers. I know the condition, but don’t know the TRUE or FALSE definition in this case.

Would you please help me?

  • This topic was modified 1 hour, 11 minutes ago by elmirasln.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer