drupal

Written by:
ami
Recently, I was trying to find a simple way to change the default input format of fields to 'Full HTML'.
I created a hook_form_alter() function in my module and for my content type body, I wrote the following:
<?php
function MODULENAME_form_alter(&$form, &$form_state, $form_id) {
  switch ($form_id) {
    case 'MYCONTENT_node_form':
      // Set default body field input format to Full HTML
      foreach(element_children($form['body_field']['format']) as $key) {
        $form['body_field']['format
Belongs to the subject:
ckeditor, drupal, input format, wysiwyg
0 comments
Syndicate content