function hook_timefield_js_settings_alter in Timefield 7
Implements hook_timefield_js_settings_alter().
Alter JS settings for a timefield instance using the jQuery plugin.
Parameters
$settings: The array of settings that will be passed to the jQuery Timepicker plugin
$context: An array of variables with information about the context where the settings were created. -type: what type of timefield instance (ex: form) -field: a copy of the field settings -instance: a copy of the instance settings
1 invocation of hook_timefield_js_settings_alter()
- timefield_field_widget_form in ./
timefield.module - Implements hook_field_widget_form().
File
- ./
timefield.api.php, line 21 - timefield.api.php
Code
function hook_timefield_js_settings_alter(&$settings, $context) {
if ($context['type'] == 'form' && $context['field']['field_name'] == 'field_my_timefield') {
$settings['showMinutesLeadingZero'] = FALSE;
}
}