You are here

function email_widget_settings in Email Field 6

Same name and namespace in other branches
  1. 5 email.module \email_widget_settings()
  2. 6.2 email.module \email_widget_settings()

Implementation of hook_widget_settings().

File

./email.module, line 192

Code

function email_widget_settings($op, $widget) {
  switch ($op) {
    case 'form':
      $size = isset($widget['size']) && is_numeric($widget['size']) ? $widget['size'] : 60;
      $form['size'] = array(
        '#type' => 'textfield',
        '#title' => t('Size of textfield'),
        '#default_value' => $size,
        '#element_validate' => array(
          '_email_widget_settings_size_validate',
        ),
        '#required' => TRUE,
      );
      return $form;
    case 'save':
      return array(
        'size',
      );
  }
}