Trying to populated a checkbox list dynamically, i have the checkboxes set correctly ie "Allow field to be populated dynamically" ticked and and the name set as "teams", I know the function is correct as it prints out correctly and I know the filter is being called. But the checkbox's from this arent being displayed, what have i missed?
Any help to shed some light on this would be much appreciated
Thanks
add_filter("gform_field_value_teams", "team_list");
function team_list($value){
$teams = get_terms('team');
foreach($teams as $team){
$teamlist[] = $team->name;
}
return $teamlist;
}