need correction with a snippet in functions.php [closed]

If it is a dropdown and you want to populate it with options may be use this filter

add_filter("gform_predefined_choices", "add_predefined_choice");
function add_predefined_choice($choices){
   $choices["My New Choice"] = array("Choice 1", "Choice 2", "Choice 3");
   return $choices;
}

http://www.gravityhelp.com/documentation/page/Gform_predefined_choices

gform_field_value_selection filter is for default value.

Give a look here http://www.gravityhelp.com/documentation/page/Developer_Docs

See if this works..

  add_filter("gform_field_value_selection", "populate_selection");
    function populate_selection ($value) {
        $favs = wpfp_get_users_favorites();
        $list = array();
        foreach ($favs as $fav){
        $list[] = get_the_title($fav);
        }
        return $list;
    }