Fix for removing the preview button (and delete button)

  1. function sitehelper_form_alter($form_id, &$form) {
  2.    global $user;
  3.    switch ($form_id) {
  4.       case 'linfo_node_form':
  5.       if($user->uid != '1') {
  6.          unset($form['preview']);
  7.          unset($form['delete']);
  8.       }
  9.       break;
  10.    }
  11. }

Submit Fix

Any tags you'd like to associate with your code, delimitered by commas (example: Views, CCK, Module, etc).
Select the syntax highlighting mode to use.