You are here

function addthis_field_widget_form in AddThis 7.4

Implements hook_field_widget_form().

The AddThis field is a placeholder field and has no widget settings. To suppress the form, #access is set to FALSE.

File

includes/addthis.field.inc, line 138
Field related hook implementations for the AddThis-module.

Code

function addthis_field_widget_form(&$form, &$form_state, $field, $instance, $langcode, $items, $delta, $element) {
  if ($instance['widget']['type'] == AddThis::WIDGET_TYPE) {
    $main_widget = $element + array(
      '#access' => FALSE,
    );
    $element['value'] = $main_widget;
  }
  return $element;
}