Closed jakejohns closed 7 years ago
I have just stumbled across this kind of issue myself today, and was about to ask for advice here on how to handle multidimensional forms.
In my case, I have
fields[groups][][name]
fields[groups][][ingredients][][quantity]
fields[groups][][ingredients][][measurement]
fields[groups][][ingredients][][ingredient]
fields[groups][][ingredients][][details]
Which poses me some problems and complex code I think.
@pmjones is there any discussion to be had on this? Do you think it's a valid idea?
@designermonkey, seem like @pmjones has been consumed by producer/bookdown/atlas for some time now. Based on the half life of some of my other open PR/Issues in other projects of fearless-leaders concern, it might be a min. Maybe @harikt has something insightful to say here? He often chimes in.
:)
Hi all,
I have nothing special / valuable information to share about this, ie why I am staying / stayed away. If I find something will mention here.
Thank you :-) .
@jakejohns @designermonkey It is appealing to have a sub-filter and a repeated-application filter. I confess that intuitively I think it's going to be difficult and ugly, but I am willing to entertain PRs around them. My guess is that they will end up being more trouble than they are worth, but if you want to try it out and present your findings, I'll give them my attention.
At this point, I think it would be best (if anyone is still interested) to pursue this as a PR against the 3.x branch.
Multidimensional Subjects, Variable Length Members, and the possible case for injecting a factory into a subject filter?
I have a couple use cases which I have solved in various hacky ways and am curious if others have insight into better solutions, or if a PR is in order.
Multi dimensional
I think it might be useful if the
SubjectFilter
had theFilterFactory
injected into it, so that I could create new 'subfilters' (probably just anotherSubjectFilter
) to validate members of the subject which are themselves data structures (array/objects) which have their own criteria.Variable length arrays
Additionally, I often have a situation where user fills out a HTML form with some JS crap to add additional fields of some kind, ie:
I think I want to be able to do something like this:
One weird thing here is that
$dateSpec
isn't really aSubjectFilter
as it's not a collection of fields itself, but also not aValueFilter
as I don't think you can configure a spec for a value filter like you do a subject filter, it's more a one off thing, right?... so anyway. Any thoughts here? Am I approaching this wrong? People solve similar problems in different ways? Or maybe have similar issues and think we should try to hash out a solution?