## Calc Builder Support

Calc Builder support
Forums

### How to set up basic product calc 24.03.2015 14:55

looking for columns and rows.

Rows and columns has radio button to select with a specific value for example

5 10 15

the Quantity would go from 1-10

if I select a2 + b3 and quantity 1 for each the total = 25

if I select a2 (quantity 2) B3 (quantity 4) the total = 80
see test cal example image

http://britepencil.com/images/cal test.jpg

Edited by britepencil - 24.03.2015 15:00

### Re: How to set up basic product calc 24.03.2015 17:20

Hi,
for building such a calculator you'll need to create one field per input (typed yes/no),or a radiobutton list per row and options list with the needed values for each quantity. Then you can build your input form at the 'form layout' of your calculator.

The calculator code could work adding options selected to the total, for ex:

//init total result
\$total=0;

//now, assuming you have a radiobutton field called 'rowA' for the first row and you have assigned value for each option and for the qty field (called 'quantityA' for this first row:

\$total=\$total+\$rowA*\$quantityA;

//Same for other rows.

Hope this helps, regards
Moonsoft Team
www.moonsoft.es

### Re: How to set up basic product calc 25.03.2015 13:25

Thank you I am starting to understand a wee bit it's all logical but the coding and what goes where is so confusing I have never did anything like this before I am designer not a programer

### Re: How to set up basic product calc 25.03.2015 14:09

Hi,
yes, you're trying to code a customized calculator, which is not a simple task for non-coders, so this tool provides an interface to deal with all steps and reduce the coding to the minimum (only write the calculations to execute), so the first step is to have an overview of the different parts. We can suggest to check also the first steps video to follow the process of building a simple calculator. Then you can try to add more fields, change the calculations and customize your own calculator as required.

These are the main parts of a calculator, that you can configure following this same order:

Input fields: these are the inputs that you will use at your form. You must configure for each one the name, the type, some limits, and for some specific types (a combobox, a radiobutton group...), some more parameters like the options you want available to choose from.

Form layout: This is the main form, it's built with html. You can create freely your preferred form, and at the place you want to insert an input field, you use the ##field## sintax. At the front end each ##field## will be replaced for the real input field.

The code/excel: In order to get the results you need to write down the math or use an excel sheet to do the calculations for you, depending on the version. At this point you have available all inputs values selected by the user and you build you result/s. Basic rules to write down expressions are shown at the video, they should do the work if you use simple operators for your calculations, but if you've any knowledge in php you could build very complex calculators as well.

Output: Again a free html section where you can place both your inputs or results using the ##field## sintax.

We suggest to try first to build a simple calculator with this structure to understand the whole process. Then you can start playing with different field types and also introduce results inside the input form. Please let us know if you need more specific help with any of the steps.

Thanks, regards
Moonsoft Team
www.moonsoft.es