Extend the drupal contact form How do I add fields to the standard Drupal contact form? Can this be done programmatically or is it a task for a module?
Yes, you can do that programmatically using the function hook_form_alter in a custom module. Follow this for creating a custom module.

function MODULE_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  if($form_id == 'contact_personal_form') {
    $form['new_field'] = array (
      '#title' =&gt; t('New field'),
      '#type' =&gt; 'textfield',
      'description' =&gt; t('The description of the new field goes here...'),
      '#required' =&gt; TRUE, // make the user to fill it compulsorily           
    );
  }
}


Update: I forgot to mention that, the above code will just add the field to the form. The field is not added the mail you send. You should implement hook_mail_alter and add the field to the body, by something like:

function MODULE_mail_alter(&amp;$message) {
  if($message['id'] == 'contact_user_mail') {
    $message['body'][] = $message['params']['new_field'];  //value of key 'new_field' same as in $form['new_field'] above in form alter
  }
}