You are here

function nodeblock_node_form_pre_render in Nodeblock 7

Pre render function.

To move the nodeblock title field to the right fieldgroup.

1 string reference to 'nodeblock_node_form_pre_render'
nodeblock_form_node_form_alter in ./nodeblock.module
Implements hook_form_node_form_alter().

File

./nodeblock.module, line 412
Enables use of specified node types as custom blocks.

Code

function nodeblock_node_form_pre_render($element) {
  $field = nodeblock_type_node_override_block_title_field($element['#node']->type);
  $element['nodeblock'][$field] = $element[$field];
  $element['nodeblock'][$field]['#weight'] = $element['nodeblock']['block_title']['#weight'];
  $element['nodeblock'][$field]['#states'] = $element['nodeblock']['block_title']['#states'];
  $element['nodeblock']['#sorted'] = FALSE;
  unset($element[$field]);
  return $element;
}