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.