how to get content type field name as drop down for filter in view
I can only give you an example of querying the users table and displaying the people in the users table as an option but this might help: 

  function example_page_builder() {

  $form = array();

 //getting the list of users
  $query = "select * from users where name!='';";

  $result = db_query($query);
  foreach ($result as $user) {
    $users[$user-&gt;uid] = $user-&gt;name;
  }

  $form['example_field_set']['users'] = array(
    '#type' =&gt; 'select',
    '#weight' =&gt; -6,
    '#title' =&gt; t('Select User:'),
    '#options' =&gt; $users,
  );

  return $form;
}