- Issue created by @saurabh-2k17
- Issue was unassigned.
- Status changed to Needs review
9 months ago 6:11pm 11 March 2024 - last update
9 months ago 130 pass - 🇮🇳India saurabh-2k17
Hi, attaching a working patch for this. Thanks to @star-szr for the help!
- last update
9 months ago 130 pass - 🇨🇦Canada star-szr
Attaching an updated patch that properly handles the field specificity (otherwise errors on all fields within the IEF will be skipped) and adds one defensive check.
- Status changed to Postponed: needs info
9 months ago 7:46pm 23 March 2024 - 🇫🇷France dqd London | N.Y.C | Paris | Hamburg | Berlin
Thanks for the report and work in here! +1
Please test if this happens only if Inline Entity Form is used which is assumed by reading the report as-is. If yes then the title and summary needs to be more specific. I changed it accordingly in assumption that it is so, but please, remove this if it not the case.
Some nit picks: please do not use abbreviations in issue summaries. Drupal.org is a multi-language user base driven community and some people have a hard time to follow texts with abbreviated words. Especially if not used consequently in the same way (edited issue summary).
Apart from that this issue has some overlaps with another issue regarding hidden fields which are required. (Can somebody please help me to find it and link, refer here, no time atm)? - Please try to read/follow both issues to understand that there are different opinions on how Conditional Fields should handle this and incorporate patches from here and there.
- 🇧🇪Belgium andreasderijcke Antwerpen / Gent
This is not an inline entity form issue, it happens on the default entity form as well.
I think the question is, is this a supported case or should setup be reversed?
You cannot make a required field conditionally optional, but you can make it conditionally required.
The latter makes more sense to me, as the given case demands it to be required only when the checkbox is selected.Also, doesn't field validation complain about the text field being empty when the specific checkbox isn't selected?
I would expect that, unless you have set a default value for the text field. This also make this feel more like a setup problem. - 🇨🇦Canada star-szr
This issue is specific to inline entity form (or at least forms-within-forms), it could potentially be incorporated into the linked issue at a later time, but I don't want to add to the confusion at this point.