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).
Comment | File | Size | Author |
---|---|---|---|
#4 | conditional_fields-invisible-required-dependee-2830521-3.patch | 2.97 KB | fertant |
screenshot_drupal_validation.png | 392.34 KB | vdanielpop | |
screenshot_js_validation.png | 404.97 KB | vdanielpop |
Comments
Comment #2
fertant CreditAttribution: fertant commentedComment #3
fertant CreditAttribution: fertant commentedField 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.
Comment #4
fertant CreditAttribution: fertant commentedComment #6
pikas CreditAttribution: pikas commentedtested and reviewed by community.
Comment #7
OlgaRabodzei CreditAttribution: OlgaRabodzei at Adyax commented