public function TripalField::instanceSettingsForm

3.x TripalField.inc public TripalField::instanceSettingsForm()

Provides a form for the 'Field Settings' of an instance of this field.

This function corresponds to the hook_field_instance_settings_form() function of the Drupal Field API.

Validation of the instance settings form is not supported by Drupal, but the TripalField class does provide a mechanism for supporting validation. To allow for validation of your setting form you must call the parent in your child class:

  $element = parent::instanceSettingsForm();

Please note, the form generated with this function does not easily support AJAX calls in the same way that other Drupal forms do. If you need to use AJAX you must manually alter the $form in your ajax call. The typical way to handle updating the form via an AJAX call is to make the changes in the form function itself but that doesn't work here.

1 call to TripalField::instanceSettingsForm()
remote__data::instanceSettingsForm in tripal_ws/includes/TripalFields/remote__data/remote__data.inc
2 methods override TripalField::instanceSettingsForm()
ChadoField::instanceSettingsForm in tripal_chado/includes/TripalFields/ChadoField.inc
remote__data::instanceSettingsForm in tripal_ws/includes/TripalFields/remote__data/remote__data.inc

File

tripal/includes/TripalFields/TripalField.inc, line 667

Class

TripalField

Code

public function instanceSettingsForm() {
  $settings = $this->instance['settings'];
  $element = array();

  $element['#field'] = $this->field;
  $element['#instance'] = $this->instance;
  $element['#element_validate'][] = 'tripal_field_instance_settings_form_validate';
  return $element;
}