Home › Forums › Front-end Issues › Reverse query › Reply To: Reverse query
I removed the ajax altogether to test this another way. I used an empty form submit with a function that is hooked to init that checks posted data and runs if it finds a value.
I also simplified the function so it only updates the field with the user id.
function add_volunteer() {
if ( isset( $_POST['add-volunteer'] ) && '1' == $_POST['add-volunteer'] ) {
$cleanup_id = $_POST['cleanup_id'];
$user_id = get_current_user_id();
update_field('field_57e89bd93b402', $user_id, $cleanup_id);
}
}
add_action( 'init', 'add_volunteer' );
I also tested it with the field set to select multiple values and select single value.
I’m still seeing the same issue though. Is it possible that this is a bug?
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.