Home › Forums › General Issues › Pre populate user field with current user › Reply To: Pre populate user field with current user
Hey @kru-x
I would look into https://www.advancedcustomfields.com/resources/acf-load_field/. Just print_r($field); exit;
in your function, and that’ll show you all the data that’s in the object.
You should be able to use wp_get_current_user()
to get the current User’s id (https://codex.wordpress.org/wp_get_current_user)
Let me know if that helps (i haven’t tested this, just trying to give you a start).
Phil
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.