function skype_field_widget_form in Skype 7
Implements hook_field_widget_form().
File
- ./
skype.module, line 62
Code
function skype_field_widget_form(&$form, &$form_state, $field, $instance, $langcode, $items, $delta, $element) {
switch ($instance['widget']['type']) {
case 'skype':
$element['skype_id'] = array(
'#attributes' => array(
'class' => array(
'edit-skype-fields-skype-id',
),
),
'#type' => 'textfield',
'#required' => $element['#required'],
'#description' => $element['#description'],
'#default_value' => isset($items[$delta]) ? $items[$delta] : '',
'#title' => $element['#title'],
'#weight' => isset($element['#weight']) ? $element['#weight'] : 0,
'#delta' => $delta,
'#prefix' => '<div class="skype-fields-skype-id-field">',
'#suffix' => '</div>',
);
break;
}
return $element;
}