Skip to content
Advertisement

Update ACF User Radio Button After Gravity Form Submit

having a issue with getting a ACF field associated with a user profile to update after a gravity form submission. As it stands, this logic currently does nothing :(. So i’m hoping someone can help out. Here is waht I have so far:

//changes studio status after those forms submit
function update_user_tour_status($entry, $form){
    $user_id = $entry['created_by'];
    $state = update_user_meta('user_'.$user_id, 'artist_tour_status', 'studio');
}
add_action('gform_after_submisson_7', 'update_user_tour_status', 10, 2);

So it should be pretty straight forward I would image, but it just seems to do nothing.

Advertisement

Answer

Check update_user_meta()

//changes studio status after those forms submit
function update_user_tour_status( $entry, $form ){
    $user_id = $entry['created_by'];
    $state   = update_user_meta( $user_id, 'artist_tour_status', 'studio' );
}
add_action( 'gform_after_submisson_7', 'update_user_tour_status', 10, 2 );
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement