You are here

function form_builder_field_configure in Form Builder 7

Same name and namespace in other branches
  1. 6 includes/form_builder.admin.inc \form_builder_field_configure()
  2. 7.2 includes/form_builder.admin.inc \form_builder_field_configure()

Form for editing a field.

1 call to form_builder_field_configure()
FormBuilderAdminTest::testChangingGroupsInElement in tests/FormBuilderAdminTest.php
Test: Elements can change the tabs displayed on their configure form.
1 string reference to 'form_builder_field_configure'
form_builder_configure_page in includes/form_builder.admin.inc
Menu callback for configuring a field.

File

includes/form_builder.admin.inc, line 590
form_builder.admin.inc Administrative interface for editing forms.

Code

function form_builder_field_configure($form, $form_state, $form_type, $form_id, $element_id) {
  module_load_include('inc', 'form_builder', 'includes/form_builder.api');
  module_load_include('inc', 'form_builder', 'includes/form_builder.cache');
  $form_obj = FormBuilderLoader::instance()
    ->fromCache($form_type, $form_id);
  $element_obj = $form_obj
    ->getElement($element_id);
  $form['#attributes']['class'][] = 'form-builder-field-configure';
  $form['#property_groups'] = module_invoke_all('form_builder_property_groups', $form_type);
  $form = $element_obj
    ->configurationForm($form, $form_state);
  $form['#_edit_form_type'] = $form_type;
  $form['#_edit_form_id'] = $form_id;
  $form['#_edit_element_id'] = $element_id;
  $form['#pre_render'][] = 'form_builder_field_configure_pre_render';
  $form['form_builder_submit'] = array(
    '#type' => 'submit',
    '#value' => t('Save configuration'),
    '#weight' => 100,
  );
  return $form;
}