Best way to set input value as php value

Hi,

What is best way to get user_id submmision owner ( not form author :slight_smile: ) and set it as PHP value?

I need run SQL query for get cutom meta value for subbmision owner and put this to input as value later.

Update value into form is no problem - i do this with code below. But how can get those user_id.

add_filter("gform_get_input_value", "update_field", 10, 4);

    function update_field($value, $lead, $field, $input_id){
        global $results_my_SQL_query;   
        if($lead["form_id"] == 190 && $field["id"] == 16)
            return $results_my_SQL_query;
        else
            return $value;
    }