PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Problem with populate dynamically

  1. Hi,

    Here is a simple function:

    in functions.php:

    function populate_finalprice($db){
    $back= ($db * 2);
    return $back;
    }
    add_filter("gform_field_value_final_price", "populate_finalprice");

    My form has a field populated dynamically. Parameter name: final_price

    I call the

    populate_finalprice(100);

    <p>function in my code.(page.php)</p>
    <p>After calling the page(wich includes the form), the field doesn't populated. It's empty.</p>
    <p>if I change the function to this:

    function populate_finalprice($db){
    $back= 'test';
    return $back;
    }
    add_filter("gform_field_value_final_price", "populate_finalprice");

    The form field is populated with: test.

    Whats the problem with my code?

    Thanks in advanced.

    Posted 15 years ago on Wednesday September 15, 2010 | Permalink