Hey there... i'd be very grateful if you could point me in the right direction here:
i've followed the instructions on how to dynamically populate a field in the form by using a query (in functions.php)... and it works fine... I have this form on a post with certain "custom fields/meta values"... and am populating the form with the same... so, i do it for one of the fields like so...
[php]
add_filter('gform_field_value_city', 'populate_city');
function populate_city($value){
global $post;
$city = get_post_meta($post->ID, "city", true);
return $city;
}
where my parameter name is "city"... and also my custom field name is "city" too... and it works... now i repeat the same thing two more times to get two more custom field values...
[php]
add_filter('gform_field_value_country', 'populate_country');
function populate_city($value){
global $post;
$country = get_post_meta($post->ID, "country", true);
return $country;
}
add_filter('gform_field_value_region', 'populate_region');
function populate_region($value){
global $post;
$region = get_post_meta($post->ID, "region", true);
return $region;
}
so... that's three in all... "city", "country" and "region".... and when i do this... it ives me a blank screen... if i remove two of the three... and leave only one.. anyone... it works... but doesnt work for more than one...
can you please help me out here...