Active
Project:
Conditional Fields
Version:
4.0.0-alpha6
Component:
Code
Priority:
Minor
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
18 Sep 2026 at 10:27 UTC
Updated:
18 Sep 2026 at 12:21 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
gurkawal commentedHi @anaconda777
I have replicated the issue on drupal 11
When editing a conditional dependency, if Custom jQuery selector for control field (under Advanced edit context settings) was previously saved, clearing the field and saving did not remove the value. Re-opening the edit form still showed the old selector.
Cause
In ConditionalFieldEditForm::submitForm(), empty form values are skipped:
if (in_array($key, $exclude_fields) || empty($value)) {
continue;
}
Because $settings is a reference to the existing stored settings, skipping an empty selector value leaves the previous value in place.
Fix
When the selector field is empty on save, we now explicitly save it as blank.
Provided the patch for the same, Please review once