API for developers that allows reacting on changed fields in a node (any entity since 8.x-3.x
) when the node has been updated. It includes two demo modules: changed_fields_basic_usage and changed_fields_extended_field_comparator.
Use cases
- You use services and services_client modules to deploy nodes on different sites and you want to avoid false positive requests (when node saved but nothing changed inside the node)
- You want to modify node object depends on changed fields values.
- You want to know which fields have been changed before node would be saved
- Some other useful things
Supported field types for Drupal 8/9/10
All core's field types
Usage for Drupal 8/9/10
Please consider this Changed Fields API Drupal 8 usage guide.
What's new in 8.x-3.x?
- Drupal 10 compatible (since 8.x-3.5 release)
- Drupal 9 compatible (since 8.x-3.4 release)
- Any Drupal 8/9/10 entity support!
- Class
NodeSubject
is replaced by more genericEntitySubject
class.
Please see detailed description here.
Supported field types for Drupal 7
All core's field types
Additional field types:
- date (date module)
- datestamp (date module)
- datetime (date module)
- phone (phone module)
- email (email module)
- link_field (link module)
- entityreference (entityreference module)
- field_collection (field_collection module)
Usage for Drupal 7
Please consider this Changed Fields API Drupal 7 usage guide.
Difference between 7.x-2.x and 7.x-3.x branches
- Branches are not compatible.
7.x-3.x
is built onspl interfaces
instead of custom ones.- In
7.x-3.x
you can define different observers with different observable bundles and its fields. In7.x-2.x
all the attached observers could observe only that bundles and its fields that were defined in subject object.
If you already use 7.x-2.x
and you don't need new feature then you can stay on this version. If you haven't used this module yet but want to use it then install 7.x-3.x
version.
Please see detailed description here.
Project information
- Module categories: Content Editing Experience, Developer Tools, Site Structure
- 286 sites report using this module
- Created by Loparev on , updated
- Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.
Releases
Development version: 8.x-3.x-dev updated 19 Jul 2022 at 18:02 UTC
Code refactoring: 3.x is not compatible with 2.x
Development version: 7.x-3.x-dev updated 22 Jul 2017 at 10:04 UTC