As specified in the title of the issue, if a required field is added as a dependee, somehow that field is also added to the edit form of the dependency and the form cannot be submitted because the supposed field is empty.

I created a dependency that has as a dependee a required field, called "Custom field". I attached 2 pictures with the issue. The first one represents the form submission with browser validation, showing the non-existing field requiring a value, while the second one shows the complete field name error (I had to add "novalidate" attribute to the form tag, in order to bypass browser validation).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

vdanielpop created an issue. See original summary.

fertant’s picture

Assigned: Unassigned » fertant
fertant’s picture

Field is in field edit form independent from state. Replacing required property will fix it. I have also found problem with making dependency for field required with dependency field state Invisible, Disabled or Optional. Fixed with validation for FieldForm.

fertant’s picture

  • Olga Rabodzei committed b6b5ad4 on 8.x-1.x
    Merge branch '2830521-required-field-visibility' into 'master'
    
    2830521...
pikas’s picture

tested and reviewed by community.

OlgaRabodzei’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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