I've seen some tutorials on getting form fields to be populated dynamically and for some reason I can't get it to work with my form. Here's the code I'm using:
add_filter("gform_field_value_all_industries", "populate_industries");
function populate_industries($value){
$output[]="Value One";
$output[]="Value Two";
return $output;
}
I've checked and my multi-select does have "Allow field to be populated dynamically" checked and the variable name is "all_industries".
What am I missing?
/edit: This is in my functions.php and I've tested using var_dump and the hook is firing - it's just not populating the form field...