You are here

function _button_field_widget_settings_html in Button Field 6

Builds the array of setting for the HTML button widget for button fields.

Parameters

string $op:

array $widget:

Return value

array

1 call to _button_field_widget_settings_html()
button_field_widget_settings in ./button_field.module
Implementation of hook_widget_settings().

File

./button_field.module, line 267
Defines a field, widget and formatter for the button field type.

Code

function _button_field_widget_settings_html($op, $widget) {

  // determine the current operation
  switch ($op) {
    case 'form':
      $form = array();
      $form['text'] = array(
        '#type' => 'textfield',
        '#title' => t('Button Text'),
        '#default_value' => isset($widget['text']) ? $widget['text'] : $widget['label'],
        '#required' => TRUE,
      );

      // end $form['text']
      $form = array_merge($form, _button_field_widget_settings_common($op, $widget));
      return $form;
      break;
  }

  // end switch $op
}