I have added some extra options in the My Profile page which users can edit. But now I have to track down the change of this value...
It's a checkbox and whenever the user (un)checks this box, something must happen. So I thought this would be in the $form_state
, but no luck there.
Next thing I did was to preform an EntityQuery on the user object and try to cross-reference it with the input, but again, no luck.
So how can I (programmatically) detect if a form-element goes from unchecked to checked or the other way around?
EDIT: What I try to do is an implementation with Campaign Monitor (a newsletter plugin). If a user has changed it's checkbox, his subscription must be updated (of leave it as it is when there is no change)