how show a calculated field when open form and read data

economyweb 19 Oct, 2021
Answer
>Hello
I would like to know how can I to show a value in a text field ONLOAD a form.
The form read database customers and show "price field" and "tax field" with values and I want to show a third field with the sum of price and tax...

in read database there is a option "special Field" where you can put:
model.basic_price = {data.model.price} and show it
but if you put {data.model.price}+{data.model.tax} or {data.model.price}*2
chronoforms show -> *2
GreyHead 09 Dec, 2021
Hi economyweb,

You can either add the calculation into the Database query (though I'm not sure that CFv7 supports that); or you can use Custom PHP to do the calculation and add the result to the form data so it will be shown along with the other data.

Bob
Post a Reply