Home Forums General Issues Possible to check if value changed?


Possible to check if value changed?

  • I’m looking to see if it’s possible to check if a field has changed, and if it has update another field?

    Right now I’m using the acf/save_post action hook, but I’m not sure how to make it conditional

  • Not sure you can do it with that hook as the hook will give you all the new data not a comparison between new and old. Can you explain exactly what it is you’re trying to achieve, there might be another way to achieve it.

    Depending on the your implementation, you may use the acf_load hook to store the values in a variables and then in the pre_save compare the values

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

The topic ‘Possible to check if value changed?’ is closed to new replies.