You are here

function signaturefield_field_widget_settings_form in SignatureField 7.2

Same name and namespace in other branches
  1. 7 includes/field.inc \signaturefield_field_widget_settings_form()

Implements hook_field_widget_settings_form().

File

includes/field.inc, line 149
Content module integration.

Code

function signaturefield_field_widget_settings_form($field, $instance) {
  $widget = $instance['widget'];
  $settings = $widget['settings'];
  $form = array();
  $form['color'] = array(
    '#type' => 'textfield',
    '#maxlength' => 7,
    '#size' => 7,
    '#title' => t('Color'),
    '#default_value' => $settings['color'],
    '#required' => FALSE,
    '#description' => t('Hex code for pen color (default is black)'),
  );
  $form['width'] = array(
    '#type' => 'textfield',
    '#maxlength' => 3,
    '#size' => 3,
    '#title' => t('Width'),
    '#default_value' => $settings['width'],
    '#required' => FALSE,
    '#description' => t('Custom width in pixels'),
  );
  $form['height'] = array(
    '#type' => 'textfield',
    '#maxlength' => 2,
    '#size' => 2,
    '#title' => t('Height'),
    '#default_value' => $settings['height'],
    '#required' => FALSE,
    '#description' => t('Custom height in pixels'),
  );
  return $form;
}