You are here

function url_field_widget_settings_form in URL field 7

Same name and namespace in other branches
  1. 8 url.module \url_field_widget_settings_form()

Implements hook_field_widget_settings_form().

File

./url.module, line 124
Provides a URL field type that stores external links with optional titles.

Code

function url_field_widget_settings_form($field, $instance) {
  $widget = $instance['widget'];
  $settings = $widget['settings'];
  $form['size'] = array(
    '#type' => 'textfield',
    '#title' => t('Size of URL field'),
    '#default_value' => $settings['size'],
    '#required' => TRUE,
    '#element_validate' => array(
      'element_validate_integer_positive',
    ),
    '#weight' => -1,
  );
  return $form;
}