Home Forums General Issues How to do an autocalculated average field?


How to do an autocalculated average field?

  • Hey everyone, I am in new to ACF and not much of a developer. Just started with wordpress a year back and been trying out ACF for few months. It will be awesome if someone here can guide me in the right direction.

    I am helping a friend create a scoring system for his darts competition.


    The fields are done with repeater field.The part that I am stuck with is how to make the average field calculated automatically as the user inserts the match score, automatically. It updates right after the user types it. Is it possible?

    Can someone lead me to the right direction as I have been trying it and figuring it out for days? ='(

  • Hi @sathyvelukunashegaran

    You will need to hook into the acf/save_post hook.

    From here you can access all the submitted values, calculate the average and set the value to another custom field.

    Hope this helps.

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

The topic ‘How to do an autocalculated average field?’ is closed to new replies.