Support

Account

Home Forums ACF PRO ACF_FORM() get return Reply To: ACF_FORM() get return

  • Hi @triixx

    I’m afraid you can’t pass the message from the acf/save_post hook. What you can do is to create a list of error codes and then use the wp_redirect() function to add the parameters to the URL so it becomes something like this:

    http://example.com/register/?success=false&error=1

    Then you can check the error code and show it on the front end like this:

    if( $_GET['success'] == 'false' && $_GET['error'] = '1' ) {
        echo "Error message code 1";
    }

    If you want, you can also use the cookie to pass the message. This page should give you more idea about it: http://www.w3schools.com/php/php_cookies.asp.

    I hope this helps 🙂