Complex Javascript Formula Crashes the Page
-
I want to create a Calculated Field (CF) with the following logic:
If user enters 5000 or less into fieldname1, then I want this CF to display 100.
If user enters anything higher than 5000 into fieldname1, then I want this CF to calculate 100 + 0.5%.
Using the Equation Tutorial, I saw that I can make complex functions using Javascript. When I enter the following logic into the equation editor, it crashes the page that the form is published on:
(function(){ if(fieldname1 > 5000) return fieldname1*0.005+100; if(fieldname1 <= 5000) return 100; })();Can you please help?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Complex Javascript Formula Crashes the Page’ is closed to new replies.