And how to display errors not through alert
Hello @kna1337
If fieldname4 is a calculated or number field, you can enter the number 500 as its “MAX” attribute, and you would not need the alert.
Best regards.
This is for example, I have mathematical calculations there, connections between fields, and if, according to the condition, the calculation goes beyond the border, it should issue a notification how to take it out not through an alert
example:
if(fieldname2+fieldname3*2+70>4000) { alert( 'WARNING!' )}
if(fieldname2+fieldname3*2+70<150) { alert( 'WARNING!' )}
if(fieldname3*2+fieldname4+80<250) { alert( 'WARNING!' )}
if(fieldname3*2+fieldname4+80>1400) { alert( 'WARNING!' )}
Hello @kna1337
If you don’t want to display an alert, you can insert an “HTML Content” field in the form and define it as dependent on the calculated field you are using for validating the values.
Please, insert an “HTML Content” field in the form and enter the Warning text as its content with the style and format you prefer. For example:
<h1 style="color:red">WARNING!!!</h1>
Now, edit the equation as follows:
IF(OR(fieldname2+fieldname3*2+70<150, 4000<fieldname2+fieldname3*2+70, fieldname3*2+fieldname4+80<250, 1400<fieldname3*2+fieldname4+80), 1, 2)
Finally, you can define a dependency in the calculated field settings to display the HTML content field inserted previously when the equation result is equal to 1.
More information about dependencies by reading the following blog post:
https://cff.dwbooster.com/blog/2020/03/01/dependencies
Best regards.