Support

Account

Home Forums General Issues Sum fields within a repeater using JQuery

Solving

Sum fields within a repeater using JQuery

  • I have a repeater with four text input fields. For each row, I need to sum the first three fields and put the total in the fourth when each of the first three fields loses focus. I can do this with jQuery using the IDs of the input fields as the selector, but I want to do this dynamically and with code that is a lot less bulky.

    My JQuery knowledge is limited. Is there a way to do this?

  • Hi @bosoxbill

    I believe you can use the .each() function to target and loop trough the fields. You can also use the .not(“:last”) function to ignore the last element (the sum row).

    Because this topic is more related to jQuery, please visit the jQuery community for further support.

    Thanks 🙂

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘Sum fields within a repeater using JQuery’ is closed to new replies.