CalcBuilder Forum

Configuring exit layout to display only selected calculations

User moon_1312 2013-11-22 20:52:08

Hello,
I have created a Calculator, which provides you the number of units of product(s) you require to complete a job. To do this I have multiple Yes/No fields, when selected the answer is given. The problem I am having is I do not want the results page to display all the products, just the selected ones.

For example:

Product A: 20 units
Product B: n/a
Product C: 30 units
Product D: n/a

So I want to remove product B and D from the results page. What can I Do?
Regards,
Jay

Edited by moon_1312 - 22.11.2013 20:53

Moonsoft support 2013-11-24 09:46:44

Hello,
you can build conditional output depending on user input. To achive this you'll need an 'if' structure:

if(condition){
$result="Your result when condition is met";
}
else{
$result="Your result when condition is NOT met";
}



so you can print ##result## at your exit layout. For your case, the condition is when checkbox is selected (replace 'yourcheckbox' for your field name):

if($yourcheckbox=="Y"){
$result="Checkbox selected";

}
else{
$result="Checkbox not selected";
}


You have a video tutorial regarding this function here:

http://www.moonsoft.es/en/demo-calcbuilder-en

(Conditional output)

that you can also check to have an example of the steps needed.


Regards

User moon_1312 2013-11-25 20:10:37

Its working perfectly.

Thank you,
Jay

Edited by moon_1312 - 25.11.2013 20:11

...
Support/development 40 hours

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

Buy now!
...
Support/development

Perfect for small code changes or to correct any bug at your site

Buy now!