Hi GV,
Here's a custom Fields i've wrote to do so : https://drive.google.com/file/d/1VOTBfJS5LnTdgc2N5hLi6VjUBSZrpmN-/view?usp=sharing
it supports MB builder and will display a field with the sum of other fields.
here's a working example :
[
'name' => __( 'Price', 'your-text-domain' ),
'id' => 'id_price',
'type' => 'number',
'min' => 1,
'max' => 10000,
'step' => 1,
],
[
'name' => __( 'Taxes', 'your-text-domain' ),
'id' => 'id_taxes',
'type' => 'number',
'min' => 1,
'max' => 30,
'step' => 1,
],
[
'name' => __( 'Taxes', 'your-text-domain' ),
'id' => 'id_delivery',
'type' => 'number',
'min' => 1,
'max' => 200,
'step' => 1,
],
[
'name' => __( 'Sum Price+Taxes+Delivery', 'your-text-domain' ),
'id' => 'sum_price_taxes_delivery',
'type' => 'math_operator',
'id_to_sum' => 'id_price,id_taxes,id_delivery',
]
Where you will see a new type of fields called math_operator
and where id_to_sum
is the id you want calculation for.
NB : it only support sum for the moment.
Have a nice day,
KL