Support

Account

Home Forums General Issues Autofill Custom Field With Average Reply To: Autofill Custom Field With Average

  • Hi @cain04

    I’m not 100% sure how you have setup the sub field for calculating the avg data, but this is how I would do it:

    1. Create a normal text field for ‘avg’ and ‘rank’.
    2. Use jQuery to calculate the score and update the value. Also, use JS to set the field as read only.

    In the docs, there is an article which coveres how to use the JS function ‘acf/setup_fields’ to run any JS. You would use this to trigger a function which loops over any rows in the repeater field and does the calculation.

    Shouldn’t take longer than 20 mins to write.

    If you are unable to write such code, perhaps you should think about contracting a JS developer to do so.

    Good luck,

    Thanks
    E