Calc Builder Support

Calc Builder support
No se permite escribir sin estar logado. Por favor, login

Conditional field (colors) 05.07.2017 12:58

Hi, have been using your component several times, really great!

I do have a question, I have an excel sheet, and based upon the result of a calculation, the output is in red color or green color. How do I translate this to the component?

Thanks in advance!

Re: Conditional field (colors) 05.07.2017 15:56

the simplest solution would be to create an additional result, let's call it


so you will set it to the right css color value. At the code you can set the desired value using conditional expressions or any other structure needed, for ex:

$color_result="#ff0000"; //red
$color_result="#0000ff"; //blue

at the output section you can use this new result to set the style of that specific section, that you can place inside a span, div, etc

span style="color:##color_result##;"



If you're using extended version and the excel mapping instead of the code, you can map another result to one additional cell, that will contain color value same as above, calculated with excel if expressions as well.

Hope this helps, regards
Moonsoft Team

Re: Conditional field (colors) 25.07.2017 18:31

Thanks for your quick reply.

I understand your explanation. Only thing is; where do I put that code? In Javascripts events, Executed after calculation?

Because my code would be like this:

$color_result="#ff0000"; //red
$color_result="#008000"; //green

Only if the calculated Globe-score is higher than the threshold (also calculated based upon other variables); it would have to turn red.

Re: Conditional field (colors) 25.07.2017 19:00

Sorry, managed to find it and get it working. Thanks!!
Are you satisfied with our products/services/support?
Please help us to keep improving, add a review at  joomla extensions site and  magento connect

Lo que nuestros clientes opinan de nosotros