Support

Account

Home Forums Front-end Issues Pass Values from ACF Form to Thank you page. Reply To: Pass Values from ACF Form to Thank you page.

  • Hi @usmanshahzad

    You only need to add it to the end of the link like this:

    wp_redirect( 'http://localhost:8888/wordpress/thank-you/?thankid=' . $post_id ); exit;

    And in the thank you page template, you can get the ID like this:

    $new_post_id = $_GET["thankid"];

    And then use it with the get_field() function like this:

    $name = get_field('custom_field_name', $new_post_id );
    echo $name;

    Where “custom_field_name” is the name of the custom field.

    I hope this helps.