After saving a node with string text fields or select list fields that are hidden by condition on node save all these fields are empty. The data is lost.
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | conditional_fields-stop_emptying_fields_when_making_invisible-3012821-10.patch | 1.17 KB | colan |
| #6 | conditional_fields-3012821-6.patch | 868 bytes | drOptimum |
Comments
Comment #2
publishing future commentedComment #3
drOptimum commentedI also have similar issue. Any hidden with conditional_fields fields lose their data on node save.
Drupal 8.6.12
conditional_fields 8.x-1.0-alpha5
Comment #4
gooddev commentedsame problem here, only after submitting the form for the second time after validation gets the values saved
Comment #5
drOptimum commentedThe attached patch deletes lines 112 and 119 from conditional_fields.js file.
Comment #6
drOptimum commentedUpdated patch submitted - file path updated as previous patch failed to apply
Comment #7
drOptimum commentedComment #8
drOptimum commentedComment #9
grimal commentedSame problem here, conditional_fields broke the node edit page if there is a workflow field, it clears the invisible fields of the schedule option.
Is it possible to fix the issue by clearing the input only if it's managed by conditional field?
Comment #11
colanThis is an unexpected regression from D7.
The above patch didn't apply. Paths must be relative to the module's directory, not the Drupal root. Fixed in this new patch here for Composer patching on top of old stable versions.
For folks that actually want to delete data, please handle that in another issue.