I created the fromtabs with migxdb and I have two listboxes, one for channels and one for programs. But the list of programs should depending on listbox of channels. Now when i select channel is display all the programs. Can i do this?
I use the latest modx version (2.8.3) and the DynamicDropdownTV is supported versions 2.2 - 2.3. I tried to upload the extra but when i used dynamic dropdown in the listbox I had this output error:
Iâm sorry, but I donât clearly understand what you are doing.
Maybe you can share the âInput Optionsâ you set for your 2 TVs of type âdynamicdropdownâ and maybe even provide the schema of your custom tables.
And I created two template variables (the names are channel and program) with input type âdynamicdropdownâ.
The input types options of channel is:
@SELECT '' AS `channel` UNION ALL (@SELECT `name_gr` AS `channel`, id FROM `[[+PREFIX]]channels_lists` WHERE `published` = 1)
And the input types options of programis:
@SELECT '' AS `program` UNION ALL (SELECT `[[+PREFIX]]programs_lists`.`name_gr` AS `program`, `[[+PREFIX]]programs_lists`.`id` FROM `[[+PREFIX]]programs_lists` INNER JOIN `[[+PREFIX]]channels_lists` ON `[[+PREFIX]]channels_lists`.`id` = `[[+PREFIX]]programs_lists`.`channel_id` WHERE `[[+PREFIX]]programs_lists`.`published` = '1' AND `[[+PREFIX]]channels_lists`.`published` = '1' AND `[[+PREFIX]]channels_lists`.`id` = '[[+channel]]' ORDER BY `[[+PREFIX]]programs_lists`.`id` DESC)
Îut the options are not showing in the migx formtabs and every time I get this error âProcessor not found: mgr//getelements.defaultâ
Donât use a @SELECT sql query for âdynamicdropdownâ TVs.
Instead fill the textfields under âXPDO Package Settings (for default processor)â. For example:
Channels:
Package Name: channels_lists
Class Name: Channel_List
Title Key: name_gr
Programs:
Package Name: programs_lists
Class Name: Program_List
Title Key: name_gr
Where Clause: {"channel_id":"[[+name_of_your_channel_dynamicdropdown_tv:default=`999999999999999`]]"}
And make sure you use the same âDynamic Dropdown Groupâ for both TVs.
Btw: It is usually a better idea to put your objects (here âChannel_Listâ and âProgram_Listâ) into the same package and not create a new package for every object.
Hello again The extra âdynamicdropdownâ its working only for single listboxes. But for multiple listboxes is not working.
The scenario is this: When i select value from medium category field i want to show the the violation types based on medium selection. The medium category field its listbox-single and violation type field is listbox-multiple. So i try to do customize.
For the medium category field i have in the input options the below code and its ok:
The extra DynamicDropdownTV also has the Input Type âdynamicdropdown_multipleâ. The problem is that it doesnât work correctly in the current version of the extra.
Maybe you can check this pull request for the necessary changes.
I changed all the files and the dynamicdropdown_mlti is working but the values of the child field still not showing. Is this correct the option of âwhere clauseâ?