Revision: 3974
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at October 11, 2007 14:09 by eethann
Initial Code
function themename_type_node_form($form) { if (isset($form['signup']['node_settings'])) { $form['signup']['#collapsible'] = FALSE; $form['signup']['#collapsed'] = FALSE; unset($form['signup']['node_settings']['settings']['signup_forwarding_email']); unset($form['signup']['node_settings']['settings']['signup_send_confirmation']); unset($form['signup']['node_settings']['settings']['signup_confirmation_email']); unset($form['signup']['node_settings']['settings']['signup_reminder']); unset($form['signup']['node_settings']['settings']['signup_reminder_email']); } if (isset($form['locations'][0])) { $form['locations'][0]['latitude']['#type'] = 'hidden'; $form['locations'][0]['latitude']['#value'] = ''; $form['locations'][0]['latitude']['#default_value'] = ''; $form['locations'][0]['longitude']['#type'] = 'hidden'; $form['locations'][0]['longitude']['#value'] = ''; $form['locations'][0]['longitude']['#default_value'] = ''; unset($form['locations'][0]['map']); unset($form['locations'][0]['province']['#options']['xx']); $form['locations'][0]['province']['#options']['xx'] = 'OTHER'; $form['locations'][0]['province']['#options']['us000'] = ' -- PLEASE CHOOSE ONE -- '; } unset($form['preview']); return drupal_render($form); }
Initial URL
Initial Description
Initial Title
Getting rid of form elements in a drupal theme function
Initial Tags
forms, drupal
Initial Language
PHP