Hello @jadmac12
Thank you very much for using our plugin.
Please, insert a calculated field in the form and enter the following equation through its “Set equation” attribute:
fieldname1*fieldname2*0.52
Straightforward.
Best regards.
Hi @codepeople
Thanks for your response, but its not working for me for some reason.
Please can you check? It’s the second calculator on the page
Here
Hello @jadmac12
I’ll try to describe first how the plugin works.
When the dynamic evaluation of the equations is enabled, each time the user edits a field’s value, the plugin checks every calculated field in the form to identify the equations affected by this value and evaluate them. However, the equations’ evaluation modifies the calculated fields’ values. So, the plugin must repeat the process until no field value varies.
So, if a field is used in its equation, it generates an endless loop. Each time the equation is evaluated it modifies the field’s value launching the equation in an endless loop.
The same happens when field “A” is used in the equation of field “B” and field “B in the equation of field “A”. The chain could be longer.
In your form, you create an endless loop with the fieldname1. It is a calculated field whose equation is fieldname1.
If it is an editable field, you can leave its equation attribute empty. Or, in situations where you need to use a field’s value in its equation, you should use the __ME__ constant.
Best regards.
@codepeople
I’m extremely confused by your response.
So essentially, I’m trying to create a form that allows people top enter the wattage of their appliance and running times in hours to get a running cot per hour, for example:
kWh per day x unit cost = cost of electricity each day.
For example:
If you had a 500W (0.5 kW) tumble dryer and operated it for the entire day (24 hours). It will use 12kWh of electricity (e.g. half a kilowatt every hour).
So, if your electricity costs 52p per unit(which is the new price cap from October), then multiply 12kWh by 52p and you get a grand total of 624p, or £6.24.
As mentioned previously, we used the 52p figure based on the new energy price cap for electricity that will be enforced from October 1st 2022.
However, since these figures change so often, these figures will need to be adjusted at regular intervals.
Hello @jadmac12
I recommended removing the fieldname1 from the equation of the fieldname1 field because it generates an endless loop.
Please, select the fieldname1 field in the form and let empty its equation. And then, select the fieldname3 and edit its equation as follows:
fieldname1*fieldname2*0.52
Best regards.