Greetings,
I have a simple one product page. It has an input field with quantity. When it submited, it takes me to another page, let's call it cart.
The cart page has GF(name, telephone, addresses etc.). It also has a hidden field, populated dynamically. Parameter name: finalprice. I would like to populate this hidden field with a function, which has an input parameter $qty, and output $qty * $price = 1000. Like this:
function populate_finalprice($qty){
$price = 1000;
return ($qty * $price);
}
How should I use the add_filter or anything else GF functions, because this one is not working:
add_filter("gform_field_value_finalprice", "populate_finalprice", 10, 1);
Thanks for any help.