If you look down at the
create_field function, you shoudl see an input that has a name attribute of
This is how ACF can POST the data to the correct name.
If you are saving 1 value, then just get your JS to put the value into this input.
If you are saving multiple values, then I will need to explain how to post an array in a later comment.
Now, after you have saved a value, you can find the value (again in the create_field function) with
$field['value']. ACF will already load the value for you and place it here!
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!