Form changes
Component ID
251247
Component name
Form changes
Component type
module
Maintenance status
Development status
Component security advisory coverage
not-covered
Downloads
994
Component created
Component changed
Component body
This small helper module can be used to track value changes in form submissions. Only install if required by another module.
Use this helper module to track changes in node field values via form submits. This tracking can be useful e.g. in cases where actions should be triggered only if a value has been changed.
To test if a field's value has changed, evaluate the global variable $form_changes any time after form validation has occurred.
Sample code:
global $form_changes;
// Respond to a change in the node body.
if (isset($form_changes['body']) && $form_changes['body'] == TRUE) {
...
}
Developed by Nedjo Rogers for Code Positive. Original development sponsored by Greenpeace UK.
