Hello @helloplanetat
Thank you very much for using our plugin. I don’t know the values you want to sum in “Then add the two values together”. But if you are referring to summing the min_value/2+max_value
Assuming the input fields in your form are:
Elevation gain, fieldname1
Distance, fieldname2
And the equation in the calculated field:
(function(){
let v1 = fieldname1/300,
v2 = fieldname2/3;
return MIN(v1,v2)/2+MAX(v1,v2);
})()
However, if you are referring to min_value/2+min_value, the equation would be:
MIN(fieldname1/300,fieldname2/3)*1.5
Best regards.
Thanks that worked perfectly 🙂
One more question: How can i change the font family of the form?
All the best,
Daniel
And is there a way do display max. 2 decimals in the “calculated field”? Thx 🙂
Hello @helloplanetat
The “Customize Form Design” attribute in the “Form Settings” tab is a CSS editor with syntax highlighting and errors check. It allows you to customize the form and fields’ appearance. For example, if you want to modify the form font-family, you can enter the style definition below (or similar) through the “Customize Form Design”:
#fbuilder *{font-family: Arial, Helvetica, sans-serif !important;}
Learn more about the form and fields customization by reading the following blog post:
https://cff.dwbooster.com/blog/2020/01/12/form-design
Best regards.
Hello @helloplanetat
You can use the PREC operation as the outermost operation in the equation:
PREC(X, Y) round the number X with Y decimals:
Ex.
PREC(MIN(fieldname1/300,fieldname2/3)*1.5, 2)
or
(function(){
let v1 = fieldname1/300,
v2 = fieldname2/3;
return PREC(MIN(v1,v2)/2+MAX(v1,v2), 2);
})()
Best regards.
Thanks for the awesome support!
One last question: Is there any way to display a Number as a time. So f.ex. 3,75 becomes 3:45?
thank you so very much for this awesome plugin <3
Hello @helloplanetat
Please look at the DECIMALTOTIME operation in the plugin documentation:
https://cff.dwbooster.com/documentation#datetime-module
But please note you must enter valid decimal values (3.75 not 3,75):
DECIMALTOTIME( 3.75, 'h', 'hh:ii' )
Best regards.