You are here

function video_embed_instagram_form in Video Embed Instagram 7

Configuration form (the callback for the form key in info).

Provide a form to configure out video settings.

1 string reference to 'video_embed_instagram_form'
video_embed_instagram_video_embed_handler_info in ./video_embed_instagram.module
Implements hook_video_embed_handler_info().

File

./video_embed_instagram.module, line 64
Add a handler for instagram videos to Video Embed Field.

Code

function video_embed_instagram_form($defaults) {
  $form = array();

  // Element for width.
  $form['width'] = array(
    '#type' => 'textfield',
    '#title' => t('Player Width'),
    '#description' => t('The width of the player.'),
    '#default_value' => $defaults['width'],
    '#element_validate' => array(
      'element_validate_integer_positive',
    ),
  );

  // Form element for the height of the player -
  // note we're using the default from defaults.
  $form['height'] = array(
    '#type' => 'textfield',
    '#title' => t('Player Height'),
    '#description' => t('The height of the player.'),
    '#default_value' => $defaults['height'],
    '#element_validate' => array(
      'element_validate_integer_positive',
    ),
  );
  return $form;
}