Home › Forums › ACF PRO › ACF Form Change input name › Reply To: ACF Form Change input name
I’ve found wp remote get
and wp remote post
which run GET or POST requests, I’ve wrapped a GET URL string in acf/save_post
as you’ve suggested like so
function my_acf_save_post( $post_id ) {
// bail early if no ACF data
if( empty($_POST['acf']) ) {
return;
}
// bail early if editing in admin
if( is_admin() ) {
return;
}
// specific field value
$field = $_POST['acf']['field_000000000'];
$urlgetstring = "http://site.com/index.php?answer1=field";
//send GET request
wp_remote_get( $urlgetstring );
}
// run before ACF saves the $_POST['acf'] data
add_action('acf/save_post', 'my_acf_save_post', 1);
Thanks for the point in the right direction!
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.