diff --git a/core/modules/field_ui/field_ui.admin.inc b/core/modules/field_ui/field_ui.admin.inc index 601c38c..64fb8eb 100644 --- a/core/modules/field_ui/field_ui.admin.inc +++ b/core/modules/field_ui/field_ui.admin.inc @@ -855,6 +855,12 @@ function field_ui_field_edit_form($form, &$form_state, $instance) { '#weight' => -5, ); + // Build the widget component of the instance. + $form['instance']['widget']['type'] = array( + '#type' => 'value', + '#value' => $widget_configuration['type'], + ); + // Add additional field instance settings from the field module. $additions = module_invoke($field['module'], 'field_instance_settings_form', $field, $instance, $form_state); if (is_array($additions)) { diff --git a/core/modules/options/lib/Drupal/options/Tests/OptionsFieldUITest.php b/core/modules/options/lib/Drupal/options/Tests/OptionsFieldUITest.php index 6e21e86..c61deaa 100644 --- a/core/modules/options/lib/Drupal/options/Tests/OptionsFieldUITest.php +++ b/core/modules/options/lib/Drupal/options/Tests/OptionsFieldUITest.php @@ -215,6 +215,10 @@ function testOptionsAllowedValuesBoolean() { ); $this->drupalPost($this->admin_path, $edit, t('Save field settings')); $this->assertRaw(t('Updated field %label field settings.', array('%label' => $this->field_name))); + + // Clear field cache. + field_info_cache_clear(); + // Test the allowed_values on the field settings form. $this->drupalGet($this->admin_path); $this->assertFieldByName('on', $on, t("The 'On' value is stored correctly."));