function field_property_field_widget_form_alter in Field property 7
Implements hook_field_widget_form_alter().
File
- ./
field_property.module, line 105 - Allows fields to be properties and have the same value across all revisions.
Code
function field_property_field_widget_form_alter(&$element, &$form_state, $context) {
if (!empty($context['instance']['is_property'])) {
$text = t("This field is synchonized across all revisions.");
if (isset($element['#description'])) {
$element['#description'] .= ' ' . $text;
}
else {
$element['#description'] = $text;
}
}
}