Sum field

Sum field

Hi all, I have a problem, in a form I have a set of numeric fields that you fill in automatically depending on the choices that you make from the dropdown field.in a numeric field should I get the sum of numeric fields .... How can I do? the formula field does not work and I tried a script but does not return results unless I fill manually, it appears that the AutoFill not possible Add.? Thank you