Change input filter

WE HAVE MOVED!

Please visit our new Drupal Website at https://www.xenyo.com我們的新網頁設計公司網頁.

function modulename_node_form_after_build(&$form) {
   $form['body'][LANGUAGE_NONE][0]['format']['format']['#value'] = 'full_html';
   $form['body'][LANGUAGE_NONE][0]['format']['#attributes']['style'] = 'display:none';
  return $form;
}
 
function modulename_form_alter(&$form, &$form_state, $form_id) {
  if($form_id == 'article_node_form') {
    $form['#after_build'][] = 'modulename_node_form_after_build';   
  }
}
Help Share this Article