Home › Forums › Backend Issues (wp-admin) › How to lock/disable user meta information once filled and submitted › Reply To: How to lock/disable user meta information once filled and submitted
ACF does have a filter called ‘acf/update_value’ which you could hook into.
This filter also sends through the $field array which it is saving to, so you can look at the $field[‘key’] as a way to run code specific to your desired field.
Basically, you could load the previous value, and if a value was found, don’t allow the new ‘different’ value to be saved by updating $value to the old value.
Does that make sense?
You will find docs on the filter over on the docs page.
Then you can use JS to add a simple disabled attribute to in the input for the client’s visual
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've just released ACF 5.12.3 with a security fix to prevent arbitrary file uploads to forms with ACF fields.— Advanced Custom Fields (@wp_acf) July 14, 2022
Now that we've released this update, we recommend updating your sites as soon as possible.
© 2022 Advanced Custom Fields.