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
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.