Writer form number field that adds other number fields?

In a Writer form, Is there a way to have a number field (preferably a “Formatted Field” but a “Numerical Field” could be okay) that adds the values in other Formatted/Numerical fields in that form? A way that doesn’t need an external database file?

Can do with macros.