Form changes
Robert Castelo - April 25, 2008 - 15:23
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:
<?php
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.
Releases
| Official releases | Date | Size | Links | Status | |
|---|---|---|---|---|---|
| 5.x-1.0 | 2008-Apr-25 | 6.49 KB | Download · Release notes | Recommended for 5.x | |
