Hello everyone,
i created a user profile using acf_form.
This is my base code, if it helps:
<?php $options = array(
'post_id' => 'user_'.$current_user->ID,
'field_groups' => array(552977),
'form' => true,
'return' => add_query_arg( 'updated', 'true', get_permalink() ),
'html_before_fields' => '',
'html_after_fields' => '',
'submit_value' => 'Aggiorna profilo'
);
acf_form( $options );
?>
I would like to know if it is possible to send this data to an external API, every time the user updates the fields
Use an acf/save_post action with a priority of <10.
The new values will be in $_POST['acf']
and the old values will be in the database and you can get them using get_field(). Compare the values and then connect to your external API to send the information if there are differences.