CalcBuilder Forum

How to set up basic product calc

User britepencil 2015-03-24 14:55:47

I need help here can some please help me setup this basic calculator

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 test.jpg

Edited by britepencil - 24.03.2015 15:00

Moonsoft support 2015-03-24 17:20:34

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

//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:


//Same for other rows.

Hope this helps, regards

User britepencil 2015-03-25 13:25:06

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

Moonsoft support 2015-03-25 14:09:35

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

Support/development 40 hours

With the peace of mind of having a professional team at your service (20% discount)

Buy now!
Support/development 10 hours

Get a bigger amount of hours for more complex tasks and get a 10% discount

Buy now!