You are here

function _fc_form_pre_render in Field Complete 7

1 call to _fc_form_pre_render()
fc_form_pre_render in ./fc.module

File

./fc.form.inc, line 166
Field Complete - Provides field-based completeness for any entity - admin.

Code

function _fc_form_pre_render($form) {
  $ids = fc_get_ids();

  // Allow other modules to change the IDs based on the form
  drupal_alter('fc_field_ids', $ids, $form);
  if (!empty($ids)) {
    $form['#field_complete'] = TRUE;
    $form['#attached']['css'][] = drupal_get_path('module', 'fc') . '/fc.css';
    if (variable_get('fc_js_ids', TRUE)) {
      $form['#attached']['js'][] = array(
        'data' => array(
          'fc' => array(
            'ids' => $ids,
          ),
        ),
        'type' => 'setting',
      );
    }

    // Allow other modules to change the form based on the IDs
    drupal_alter('fc_form_pre_render', $form, $ids);
  }
  return $form;
}