diff options
Diffstat (limited to 'modules/field/field.api.php')
-rw-r--r-- | modules/field/field.api.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/field/field.api.php b/modules/field/field.api.php index 73787b00d..041122bfe 100644 --- a/modules/field/field.api.php +++ b/modules/field/field.api.php @@ -728,6 +728,9 @@ function hook_field_is_empty($item, $field) { * - FIELD_BEHAVIOR_DEFAULT: (default) If the widget accepts default * values. * - FIELD_BEHAVIOR_NONE: if the widget does not support default values. + * - weight: (optional) An integer to determine the weight of this widget + * relative to other widgets in the Field UI when selecting a widget for a + * given field instance. * * @see hook_field_widget_info_alter() * @see hook_field_widget_form() @@ -737,7 +740,7 @@ function hook_field_is_empty($item, $field) { * @see hook_field_widget_settings_form() */ function hook_field_widget_info() { - return array( + return array( 'text_textfield' => array( 'label' => t('Text field'), 'field types' => array('text'), @@ -764,6 +767,8 @@ function hook_field_widget_info() { 'multiple values' => FIELD_BEHAVIOR_DEFAULT, 'default value' => FIELD_BEHAVIOR_DEFAULT, ), + // As an advanced widget, force it to sink to the bottom of the choices. + 'weight' => 2, ), ); } |