Closed (fixed)
Project:
Conditional Fields
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
28 Aug 2019 at 22:03 UTC
Updated:
26 Dec 2019 at 16:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
haskweb commentedComment #3
colan#2: Thanks for offering to work on this!
I don't see any patch here so this should still be Active. Fixing status.
Comment #4
ergonlogic@haskweb Have you made any progress on this?
To make quicker progress on #1161314: Add basic Field Group support for ANDing conditions, it'd be handy to be able to refactor
ConditionalFieldsFormHelper::afterBuild(). But without instance vars, this'd be nearly pointless.Comment #5
colanAnyone if free to take this over as there's been no update in a while.
Comment #6
ergonlogicWe've got this working, though a number of the methods remains static at the moment. We'll continue re-factoring
ConditionalFieldsFormHelperin #1161314: Add basic Field Group support for ANDing conditions.Patch forthcoming.
Comment #7
llamechPatch attached.
Comment #8
llamechHere's an updated patch with further cleanup.
Comment #9
colanThe first line here is producing this on node edit pages with conditional fields (probably where there are no dependees):
I personally like method chaining, but I'm happy either way so feel free to skip it. So if all of these methods return
$this, we can do:return $this->processDependentFields()->addJavascriptEffects()->addValidationCallback()->form;Overall, seems to work well in my tests except for the undefined-index error above.
Comment #10
ergonlogicI had committed a fix for the "undefined index" warning over in #1161314: Add basic Field Group support for ANDing conditions. I've cherry-picked it here.
I also added the fluent style, as suggested.
Comment #11
ergonlogicComment #13
colanMuch better.
Comment #15
colan