How to sum value from several fields?

I have fallowing problem in form I hale several fields (combobox, Radiobutton) for choice into value I use simply method one pre line (1 | 1, 2 | 2 ect.). When user choice all answer in all fields I want to get value from every fields changes its format to number and sum it. I try use speared fields it name is form_sum (number format) I put in its default value fallowing code

@TextToNumber(field_1) +

@TextToNumber(field_2) +

@TextToNumber(field_3);

But it not work.

Pleas help me how sum theses vale??

I want to do it on client.

Thanks so much.

Subject: How to sum value from several fields?

By “it not work”, what do you mean? Are you getting an error, or is it just not computing?

I’ll take a stab at it anyways…

If you want the field to compute automatically (without requiring the user press a button or something), then the first thing you want to do is make your field (“form_sum”) computed. The formula you documented should work.

Then, you want to make sure that changes to the selection fields initiate a refresh by ticking the “Refresh fields on keyword change” field property (second tab).

Hope that helps!