function mediaelement_field_formatter_settings_form in MediaElement 7.2
Same name and namespace in other branches
- 7 mediaelement.field.inc \mediaelement_field_formatter_settings_form()
Implements hook_field_formatter_settings_form().
File
- ./
mediaelement.module, line 213 - Provides HTML5 video and audio elements using Mediaelement.js for HTML4 browsers.
Code
function mediaelement_field_formatter_settings_form($field, $instance, $view_mode, $form, &$form_state) {
$display = $instance['display'][$view_mode];
$settings = $display['settings'];
$element = array();
$element['controls'] = array(
'#title' => t('Controls'),
'#type' => 'checkbox',
'#default_value' => $settings['controls'],
);
$element['width'] = array(
'#title' => t('Width'),
'#type' => 'textfield',
'#default_value' => $settings['width'],
);
$element['height'] = array(
'#title' => t('Height'),
'#type' => 'textfield',
'#default_value' => $settings['height'],
);
$element['download_link'] = array(
'#title' => t('Download Link'),
'#type' => 'checkbox',
'#default_value' => $settings['download_link'],
);
$element['download_text'] = array(
'#title' => t('Download Link Text'),
'#type' => 'textfield',
'#default_value' => $settings['download_text'],
);
return $element;
}