function link_field_widget_settings_form

Implements hook_field_widget_settings_form().

File

drupal/core/modules/field/modules/link/link.module, line 111
Defines simple link field types.

Code

function link_field_widget_settings_form($field, $instance) {
  $widget = $instance['widget'];
  $settings = $widget['settings'];
  $form['placeholder_url'] = array(
    '#type' => 'textfield',
    '#title' => t('Placeholder for URL'),
    '#default_value' => $settings['placeholder_url'],
    '#description' => t('The placeholder is a short hint (a word or short phrase) intended to aid the user with data entry. A hint could be a sample value or a brief description of the expected format.'),
  );
  $form['placeholder_title'] = array(
    '#type' => 'textfield',
    '#title' => t('Placeholder for link title'),
    '#default_value' => $settings['placeholder_title'],
    '#description' => t('The placeholder is a short hint (a word or short phrase) intended to aid the user with data entry. A hint could be a sample value or a brief description of the expected format.'),
    '#states' => array(
      'invisible' => array(
        ':input[name="instance[settings][title]"]' => array(
          'value' => DRUPAL_DISABLED,
        ),
      ),
    ),
  );
  return $form;
}