You are here

function nfcbiblio_nodeformcols_base_form_alter in Node form columns 7

Implements hook_nodeformcols_base_form_alter().

Implement this hook if you want to alter the node creation form that nodeformcols uses to construct the configuration interface before nodeformcols reads field information from it.

Parameters

array $form: The programatically created node creation form.

string $variant: The variant of the form that's being configured.

Return value

void

File

./nfcbiblio.module, line 73

Code

function nfcbiblio_nodeformcols_base_form_alter(&$form, $variant) {
  if ($form['#node']->type == 'biblio') {
    if ($variant == 'default') {
      $variant = _nfcbiblio_top_visible_type();
    }
    $biblio_form_state = array();
    $biblio_form_state['post']['biblio_type'] = $variant;
    foreach (biblio_form($form['#node'], $biblio_form_state) as $name => $def) {
      $form[$name] = $def;
    }
  }
}