Forum
Using a form validator to populate another field
I have (simplified as best I can for discussion purposes):
Collection "ColA" with a category field "CatA" and category field "CatB" and other fields to describe the products
Collection "ColB" with a category field "CatB" and category field "CatC" and other fields to describe the feature
Collection "ColC" with a category field "CatC" and other fields to describe the "Use Cases"
Category "CatA" - (Product Listing)
Category "CatB" - (Feature Listing)
Category "CatC" - (Product "Use Case")
So, when I look at ColA I can output all the features and the associated Use Cases for each feature. However, I need to be able to occasionally remove Use Cases for particular products.
What I'd like to do is have a repeat region in CatA (Product) for each (ColB) Feature Collection Reference (a repeater that has one collection reference). From there I'd like to have another field in that repeater that populates a Collection reference field (referencing ColC) based on the entry for ColB - so that the user can remove or add Use Cases for a particular Product. For most products, the default ColC items contained in CatB are fine so it could be a checkbox like "Customize Use Cases" could add the ColC field.
It would seem that a Form Validator on ColB could do the appropriate lookup for CatC, but I'm not sure if I could take that response from that validator and apply it to another field. Alternatively, it seems there might be a form event listener that could also serve the purpose - but I really don't know how to implement event listeners in a form.
Sorry for the complexity - hope it makes sense.
Honestly, it doesn't really make sense to me. I think this is beyond the scope of free support.
No worries. I'm probably misusing categories in my structure.