"Invisible" should imply "unrequired" and "empty".
Maybe "empty" should be optional, but i can't think of a use case for invisible but value.

Comments

axel.rutz created an issue. See original summary.

geek-merlin’s picture

Status: Active » Needs review
StatusFileSize
new1.7 KB

Patch flying in that implements this (maybe #2983376: Action "Empty" has no effect must be applied before).

  • axel.rutz committed 6c70583 on 8.x-1.x
    Issue #2983381 by axel.rutz: Make invisible imply unrequired and empty
    
geek-merlin’s picture

Status: Needs review » Fixed

Tested and used in production, so committing.
If some use case arises, we can still make this configurable.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

publishing future’s picture

In fact "empty" should be optional! There are many use cases, where fields shall be hidden (e.g. in a certain workflow state) and shall be displayed later again (e.g. in another workflow state) with their previous values. Applying this patch needs caution, because it seems to wipe out all values in fields that are hidden, when a node is saved.

jasonluttrell’s picture

This seems related: https://www.drupal.org/project/conditional_fields/issues/2845855#comment...

Invisible elements are still required as of 8.x-1.0-alpha9.