Great treatment with great results. Thanks to the lovely team.
add_filter('gform_confirmation', function($confirmation, $form, $entry) { // Get Gravity Forms values $email = rgar($entry, '2'); $phone = rgar($entry, '3'); if (!$email && !$phone) { return $confirmation; } // Inject safely encoded values into JS $email_js = json_encode($email); $phone_js = json_encode($phone); $script = " "; return $confirmation . $script; }, 10, 3);
Great treatment with great results. Thanks to the lovely team.