Calculation with if/else Syntax?
-
Hi,
I am creating a website for a printing shop. They want a form to calculate prices for printing products e.g. project work or master thesis.
The link to the page shows an form made with forminator but without calculations. But the form is the basic for the calculation I descripe in the following.The price of the different products depends e.g. on number of pages, type of paper and more.
So e.g. if its a master thesis (drop-down-field) with normal paper cost for
until 100 pages 0,1$ each page
until 200 pages 0,08$ each page
up to 200 pages 0,05$ each page
(page is a input field of numbers)So e.g. if its a master thesis with special paper cost for
until 100 pages 0,2$ each page
until 200 pages 0,15$ each page
up to 200 pages 0,10$ each pageSo e.g. if its a project work normal paper cost for
until 100 pages 0,12$ each page
until 200 pages 0,09$ each page
up to 200 pages 0,07$ each pageSo what I want to show: the price depends on different options. To Calculate this I will need If/else-instructions.
e.g.
If (drop-down-field == “master thesis”) {
if (page-number <= 100){
page-number * 0,1
}
if (page-number <= 200){
page-number * 0,08
}
if (page-number > 200){
page-number * 0,05
}
}
else if(drop-down-field == “project work”{…}Is if/else possible with the calculator and how is the Syntax?
Kind regards,
J.Fetzer
The page I need help with: [log in to see the link]
- The topic ‘Calculation with if/else Syntax?’ is closed to new replies.