Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

if value greater then fieldname “warning…”

$
0
0

Replies: 1

Good day!there is data in field1 and field2. Field 3 contains calculations (field1*field2). If the result in field 3 is greater than the value of field 1, the warning “Attention” should be displayed in field 3.
Do the following:

(function(){
var result = fieldname1*fieldname2;
if(result>fieldname1) return ROUND(result,0.001);
return ‘Warning message here’;
})()

But this function doesn’t work. Constantly shows “Attention”. Can you tell me what I’m doing wrong?


Viewing all articles
Browse latest Browse all 59525

Trending Articles