function field_test_field_widget_properties_alter in Drupal 7
Implements hook_field_widget_properties_alter().
File
- modules/
field/ tests/ field_test.module, line 232
Code
function field_test_field_widget_properties_alter(&$widget, $context) {
// Make the alter_test_text field 42 characters for nodes and comments.
if (in_array($context['entity_type'], array(
'node',
'comment',
)) && $context['field']['field_name'] == 'alter_test_text') {
$widget['settings']['size'] = 42;
}
}