Echo field value after submission

Hi,
I’m using a form to submit first before view an iframe,
I used to keep it for loggedin users only but now I need to make it for everyone
I used this code in functions.php to get the user full name from the form

add_action( 'gform_after_submission_33', 'getUsername', 10, 2 );
function getUsername($entry,$form) {
  $username = rgar( $entry, '22.3' );
  return $username;
}

Now I want to echo this value in samepage after form submission, how to do that?
Thanks

I will also make multiple forms for multiple pages, what is the best way to echo a field value on the same page without using gform_after_submission action!

Hello,

The gform_after_submission hook is not intended to output values to the screen, but to run custom actions in the background.

If your form confirmation is set to Text type, you can use the following filter to output any submitted value: gform_confirmation - Gravity Forms Documentation

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.