Calculate total from fillable form

Hi,

I’m creating a fillable form in LibreOffice but I need a field that gives me the total of other fields (numbered format) but I can’t find the right format for that field so it calculates the total (see the image below).

I’d appreciate your help!
Thank you!

Short answer: NO. JavaScript in a PDF document is apparently a proprietary extension to the specification, source, Wikipedia:

PDF 1.7, the sixth edition of the PDF specification that became ISO
32000-1, includes some proprietary technologies defined only by Adobe,
such as Adobe XML Forms Architecture (XFA) and JavaScript extension
for Acrobat, which are referenced by ISO 32000-1 as normative and
indispensable for the full implementation of the ISO 32000-1
specification. These proprietary technologies are not standardized and
their specification is published only on Adobe’s
website.[8][9][10][11][12] Many of them are also not supported by
popular third-party implementations of PDF.

On July 28, 2017, ISO 32000-2:2017 (PDF 2.0) was published.[13] ISO
32000-2 does not include any proprietary technologies as normative
references.[14]

What this means is that you need to use Adobe’s own software in order to produce a PDF form which acts like a spreadsheet.

Assuming your 6 values are in the cell ranges A2:A4 and C2:C4 then the formula in E4 would be =SUM(A2:A4;C2:C4)

I think the question here is how to produce a PDF form that acts as a spreadsheet and can thus produce a sum in one of the form fields. As far as I know this would require scripting. PDF as a format does support embedded JavaScript.

The question didn’t mention PDF, but if that was meant then, yes, there’s no such thing in a PDF export.