You are here

function ctools_form_include in Chaos Tool Suite (ctools) 7

Include .inc files in a form context.

This is a variant of ctools_include that will save information in the the form_state so that cached forms will properly include things.

3 calls to ctools_form_include()
ctools_entity_field_content_type_formatter_styles in plugins/content_types/entity_context/entity_field.inc
ctools_wizard_multistep_form in includes/wizard.inc
Display a multi-step form.
_ctools_export_ui_add_form_files in plugins/export_ui/ctools_export_ui.class.php
Add all appropriate includes to forms so that caching the form still loads the files that we need.

File

./ctools.module, line 144
CTools primary module file.

Code

function ctools_form_include(&$form_state, $file, $module = 'ctools', $dir = 'includes') {
  if (!isset($form_state['build_info']['args'])) {
    $form_state['build_info']['args'] = array();
  }
  $dir = '/' . ($dir ? $dir . '/' : '');
  form_load_include($form_state, 'inc', $module, $dir . $file);
}