You are here

function soundcloudfield_field_widget_form in SoundCloud field 7

Implements hook_field_widget_form().

Pseudo-hook.

File

./soundcloudfield.module, line 217
@author Attila Fekete - http://drupal.org/user/762986

Code

function soundcloudfield_field_widget_form(&$form, &$form_state, $field, $instance, $langcode, $items, $delta, $element) {
  $base = $element;
  if ($instance['widget']['type'] == 'soundcloud_url') {
    $element['url'] = array(
      '#type' => 'textfield',
      '#default_value' => isset($items[$delta]['url']) ? $items[$delta]['url'] : NULL,
      '#maxlength' => 255,
    ) + $base;
  }
  return $element;
}