Home › Forums › ACF PRO › Calculations › Reply To: Calculations
You need to add your own custom JavaScript to the ACF admin create the code that watches for changes in the first 2 fields, does the calculation and then updates the 3rd field.
How this code is built depends on what version of ACF you are using. However, the JavaScript in ACF4 and ACF5 are not compatible and ACF5 will be released to the WP plugin repo before the end of this year. If you build it using ACF4 then you’ll need to rebuild it for ACF5. I’d suggest buying 5 http://www.advancedcustomfields.com/pro or waiting until the free version of ACF5 is released to WP.
For ACF 5 I have created several examples of getting and setting values in ACF using JavaScript. Simple number and text type fields are far easier than many of the examples I’ve created https://github.com/Hube2/contact-form-7-dynamic-select-extension, but the principle is the same.
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’re reaching out to our multilingual users to ask for help in translating ACF 6.1. Help make sure the latest features are available in your language here: https://t.co/TkEc2Exd6U
— Advanced Custom Fields (@wp_acf) May 22, 2023
© 2023 Advanced Custom Fields.
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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.