Greetings, Unfortunately im not that great with PHP and my searching has yielded nothing. I am trying to "dynamically" fill in a field using the "Gform field value $parameter name". It works fine except I'd like to use a php variable (? i think it would be called that) e.g.
<?php
add_filter("gform_field_value_email", "populate_email");
function populate_email($value){
$testyo = "blah";
return $testyo;
}
The above works.
<?php
$testyo = $client_email;
add_filter("gform_field_value_email", "populate_email");
function populate_email($value){
return $testyo;
}
But the above won't work. The $client_email is something that's defined further up. I'm sure the solution is simple and I'd appreciate any help. Forgive my ignorance.