function video_embed_field_handler_vimeo_form in Video Embed Field 7
Same name and namespace in other branches
- 7.2 video_embed_field.handlers.inc \video_embed_field_handler_vimeo_form()
Defines the form elements for the vimeo configuration form
1 string reference to 'video_embed_field_handler_vimeo_form'
- video_embed_field_video_embed_handler_info in ./
video_embed_field.module - Implementation of hook_video_embed_handler_info
File
- ./
video_embed_field.module, line 608
Code
function video_embed_field_handler_vimeo_form($defaults) {
//use base defaults to ensure that each setting has some default value - $defaults, the user entered values will override
$base_defaults = array(
'height' => 315,
'width' => 560,
'teaser_height' => 315,
'teaser_width' => 560,
'color' => '00adef',
'autoplay' => 0,
);
$defaults = array_merge($base_defaults, $defaults);
$form = array();
$form['height'] = array(
'#type' => 'textfield',
'#size' => '5',
'#title' => t('Player Height'),
'#description' => t('The height of the vimeo player, in pixels. Only enter the number e.g. 315'),
'#default_value' => $defaults['height'],
);
$form['width'] = array(
'#type' => 'textfield',
'#size' => '5',
'#title' => t('Player Width'),
'#description' => t('The width of the vimeo player, in pixels. Only enter the number e.g. 560'),
'#default_value' => $defaults['width'],
);
$form['teaser_height'] = array(
'#type' => 'textfield',
'#size' => '5',
'#title' => t('Player Height - Teaser'),
'#description' => t('The height of the vimeo player, in pixels. Only enter the number e.g. 315'),
'#default_value' => $defaults['teaser_height'],
);
$form['teaser_width'] = array(
'#type' => 'textfield',
'#size' => '5',
'#title' => t('Player Width - Teaser'),
'#description' => t('The width of the vimeo player, in pixels. Only enter the number e.g. 560'),
'#default_value' => $defaults['teaser_width'],
);
$form['color'] = array(
'#type' => 'select',
'#options' => array(
'00adef' => t('Blue'),
'ff9933' => t('Orange'),
'c9ff23' => t('Lime'),
'ff0179' => t('Fuschia'),
'ffffff' => t('White'),
),
'#title' => t('Player Color'),
'#description' => t('The color to use on the vimeo player.'),
'#default_value' => $defaults['color'],
);
$form['autoplay'] = array(
'#type' => 'checkbox',
'#title' => t('Autoplay'),
'#description' => t('Play the video immediately.'),
'#default_value' => $defaults['autoplay'],
);
return $form;
}