Hi, I'm just getting my head into the capabilities of MIGX so please bear with me. I'd like to ask about the feasibility of the following requirement:
Lets say we have a field: Topics
This field should pull in a list of options in checkbox format from a custom db table.
Option 1 [ ]
Option 2 [ ]
Option 3 [ ]
When a user selected an option(s), a further field "Criteria" (with radio buttons) should display side-by-side with the chosen option(s), for example:
Option 1 [X] - Criteria: ( ) High (*) Medium ( ) Low
Option 2 [X] - Criteria: ( ) High ( ) Medium (*) Low
Option 3 [X] - Criteria: (*) High ( ) Medium ( ) Low
So Option 1 has a criteria of "Medium" assigned.
The idea would then be to write a snippet that can cycle through the selected options and criteria and sort resources accordingly but that's another story.
Could the above "related" fields feature be achieved with MIGX?
There are several ways to do something like this with MIGX or with MIGXdb.
The easiest to configure option would be to use a MIGX-TV and have MIGX-items for each selected option.
In the MIGX-form (where you add or edit items) you could have a listbox-field with @EVAL or @SELECt-binding,
where you can choose the option. Then you could have this radio-buttons where you can select the Criteria.
you can add, remove, sort, edit all options. You could also add another field with an 'active' - state, if that is needed.
At frontent you will get records with selected options and you could use the getImageList-snippet or a custom-snippet to generate the TV-filters or what else you will need there.
The MIGXdb - way could show a grid with all possible options directly from your db.
You could have an activate/deactivate-menue-option for each row and an option where you select the Criteria for this relation.
The datas would not be stored in a TV as json, as it is done by the MIGX-TV, but in a custom join-table.
The second way is more configuration involved, but you could have real join-relations between table-records/resources
That's great to hear Bruno - thanks for the explanation.