function field_form_set_state

Stores processing information about a field in $form_state.

Parameters

$parents: The array of #parents where the field lives in the form.

$field_name: The field name.

$langcode: The language in which the field values are entered.

$form_state: The form state.

$field_state: The array of data to store. See field_form_get_state() for the structure and content of the array.

See also

field_form_get_state()

9 calls to field_form_set_state()
field_add_more_submit in drupal/core/modules/field/field.form.inc
Form submission handler for the "Add another item" button of a field form.
field_attach_form_validate in drupal/core/modules/field/field.attach.inc
Performs field validation against form-submitted field values.
field_form_element_after_build in drupal/core/modules/field/field.form.inc
After-build callback for field elements in a form.
field_ui_field_edit_form_validate in drupal/core/modules/field_ui/field_ui.admin.inc
Form validation handler for field_ui_field_edit_form().
file_field_widget_submit in drupal/core/modules/file/file.field.inc
Form submission handler for upload/remove button of file_field_widget_form().

... See full list

File

drupal/core/modules/field/field.form.inc, line 218
Field forms management.

Code

function field_form_set_state($parents, $field_name, $langcode, &$form_state, $field_state) {
  $form_state_parents = _field_form_state_parents($parents, $field_name, $langcode);
  drupal_array_set_nested_value($form_state, $form_state_parents, $field_state);
}