Thursday, August 19, 2010

Hook form alter

Example of hook_form alter

/*
 * implementation of hook_form_alter
 * remove user term form by
 * removing user_term fieldset
 */
function helper_form_alter(&$form, $form_state, $form_id) {
  //if ($form_id == 'user-profile-form') {
      $form['user_terms']['#type']['fieldset'] = FALSE;
    //}
    dsm($form_id);
  }

No comments:

Post a Comment