You are here

function video_embed_dailymotion_form in Video Embed Dailymotion 7

Provide a form to configure out video settings.

Parameters

array $defaults: default/current values for your provider, the currently saved settings with empty values filled with the defaults provided in info hook

Return value

array form as defined by forms api

1 string reference to 'video_embed_dailymotion_form'
video_embed_dailymotion_video_embed_handler_info in ./video_embed_dailymotion.module
Implements hook_video_embed_handler_info().

File

./video_embed_dailymotion.module, line 42
Add a handler for dailymotion videos to Video Embed Field with this module you can add videos from dailymotion.com

Code

function video_embed_dailymotion_form($defaults) {
  $form = array();
  $form['height'] = array(
    '#type' => 'textfield',
    '#title' => t('Player Height'),
    '#description' => t('The height of the player.'),
    '#default_value' => $defaults['height'],
    '#element_validate' => array(
      '_video_embed_dailymotion_element_validate',
    ),
  );
  $form['width'] = array(
    '#type' => 'textfield',
    '#title' => t('Player Width'),
    '#description' => t('The width of the player.'),
    '#default_value' => $defaults['width'],
    '#element_validate' => array(
      '_video_embed_dailymotion_element_validate',
    ),
  );
  $form['allowfullscreen'] = array(
    '#type' => 'checkbox',
    '#title' => t('Allow Fullscreen'),
    '#desecription' => t('This will allow the video to be fullscreened.'),
    '#default_value' => $defaults['allowfullscreen'],
  );
  $form['allowautoplay'] = array(
    '#type' => 'checkbox',
    '#title' => t('Allow Autoplay'),
    '#desecription' => t('This will allow the video to autoplay.'),
    '#default_value' => $defaults['allowautoplay'],
  );
  return $form;
}