CalcBuilder Forum

Help for a Calculator

Usuario Xanthios 2016-01-13 16:43:37

Hi, I wanted to ask if it would be possible , which could create someone a spreadsheet ? I still do not understand this component .

My client should first select a basic package , anschliesend additional options , and finally even the maintenance . All this should give a statement .

Just like here
http://webkoenig.ch/webdesign/budget/web-15/

Edited by Xanthios - 13.01.2016 16:44

Moonsoft support 2016-01-13 20:37:13

Hi,
we've checked your example page, and we can confirm such calculator can be built using the calcbuilder module. The steps to build that calculator would be:

- Create as many fields (typed YES/NO) as checkboxes you want to show.
- Create the form at 'form layout'
- At the code, start with one variable $result=0, and add the amounts of the options selected. In order to check if the checkbox is selected, you can use:

if($checkbox1=="Y"){
$result=$result+50;
}

as an example for a checkbox called checkbox1 with a price of 50.

- Print at the 'exit layout' your result, as ##result##

That should do the work. If you have an spreadsheet able to do the calculations and the extended version, you can map your checkboxes and the output instead.

Hope this helps, regards