Getting values in gform_confirmation for Gravity Forms

A little background info:

I’m using the Gravity Forms plugin and I’m trying to use a dynamic custom confirmation. However, the form that is filled has quite a bit of data/values variables. However, I cannot use those variables. They simply won’t load. Any clues? See the code below.

add_filter("gform_confirmation_3", "custom_confirmation", 3, 4 );
function custom_confirmation($confirmation, $form, $lead, $ajax){

if($form["id"] == "3"){

    $confirmation = "
    <div class='confirmationbuild'>
    <h2>Your units will arrive in 6 hours</h2> 

    You will be redirected in 3 seconds. <br/><br/>

    <a class='confirmationbutton' href='http://www.**********.nl/infantry'>
    <strong>Click here to be redirected now</strong></a><br/><br/>

    <script type='text/javascript'>
    setTimeout(function () {
    window.location.href='http://www.*********.nl/infantry'; // the redirect goes here


else if($form["id"] == "5"){
    $confirmation = "Thanks for contacting us. We will get in touch with you soon";

return $confirmation;


Solutions Collecting From Web of "Getting values in gform_confirmation for Gravity Forms"