Hello @jlou,
The “Calculated Fields Form” plugin does not include a chart module, however, you can install another of our plugin: “CP Blocks” (https://ww.wp.xz.cn/plugins/cp-blocks/). This plugin includes complementary blocks of code you can use with the forms created with the “Calculated Fields Form”, the “Contact Form 7” plugin or directly into the content of posts and pages. Some of blocks are free and other should be installed with a paid license. The “CP Blocks” plugin includes a Bar Chart block, a Pie Chart and a Bubble Chart.
However, if you are a javascript programmer you can extend the forms created with the “Calculated Fields Form” entering <script></script> tags into the content of “HTML Content” fields.
Best regards.
Thread Starter
jlou
(@jlou)
Hello @jlou,
In this case the process is very simple, for example, assuming the number field for entering the width is the fieldname1, and there is a dropdown field (fieldname2) whose choices are for example:
– Text of first choice 1:2, value 2
– Text of the second choice 1:3, value 3
– Text of the third choice 2:3, value 1.5
The fields’ names, and the choices’ texts and values are hypothetical, only to describe the process.
The equation associated to the calculated field to estimate the height would be simple:
fieldname1*fieldname2
and that’s all.
Print the rectangle is very simple too. If you insert a Div field with a specific width and an unique id assigned in your webpage (where you want), for example: my-preview
<div id="my-preview" style="width:150px;border:1px solid #333"></div>
The equation would be then:
(function(){
jQuery('[id="my-preview"]').height(150*fieldname2);
return fieldname1*fieldname2;
})()
I’m sorry, but the support service does not cover the implementation of the users’ projects (forms or formulas). If you need additional support implementing your project I can offer you a custom coding service from my private website:
https://cff.dwbooster.com/customization
Best regards.