We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 49499
    • 48 Posts
    I'm currently using MIGXdb to manage child resources in a grid TV, as explained in this example. Currently, as long as I use a regular TV type, everything works great. I'd like to use migx's tv type to provide a more complex option and multiple fields and values for a single TV.

    Here's where I'm stuck. Let's say I have a migx TV called "Event Times" used for listing several sessions within a conference. Each item within this TV has the following fields:

    • eventtime - date - Event Time
    • eventtitle - text - Event Title
    • eventdescription - textarea - Event Description

    The TV works perfectly when using MODX's default editor for resources. However, I am using a CMP like the one in the above tutorial to manage child resources of the page "Events". When I view the form tab where the TV is located, the grid is there with the correct headers but not entries are present (even if they have been created manually through the MODx resources document editor). When I try to add an item to the TV, a generic box without my fields pops up (see attached image).

    Does anyone have any ideas or suggestions for getting a migx TV field to work properly within a migxDB CMP managing child resources?

    This question has been answered by multiple community members. See the first response.

      • 4172
      • 5,888 Posts
      could you export your configuration of the CMP (right-click at the grid ->import/export)

      and paste that code here, please.

      And also the configuration of your MIGX-TV.
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 49499
        • 48 Posts
        Thank you for your response!

        Quote from: Bruno17 at Dec 18, 2014, 11:29 PM
        could you export your configuration of the CMP (right-click at the grid ->import/export)

        {
          "formtabs":[
            {
              "MIGX_id":16,
              "caption":"Event Details",
              "print_before_tabs":"0",
              "fields":[
                {
                  "MIGX_id":51,
                  "field":"eventstart",
                  "caption":"Start Date",
                  "description":"",
                  "description_is_code":"0",
                  "inputTV":"eventstart",
                  "inputTVtype":"date",
                  "validation":"required",
                  "configs":"",
                  "restrictive_condition":"",
                  "display":"",
                  "sourceFrom":"config",
                  "sources":"",
                  "inputOptionValues":"",
                  "default":"",
                  "pos":1
                },
                {
                  "MIGX_id":53,
                  "field":"eventend",
                  "caption":"End Date",
                  "description":"",
                  "description_is_code":"0",
                  "inputTV":"eventend",
                  "inputTVtype":"date",
                  "validation":"required",
                  "configs":"",
                  "restrictive_condition":"",
                  "display":"",
                  "sourceFrom":"config",
                  "sources":"",
                  "inputOptionValues":"",
                  "default":"",
                  "pos":2
                },
                {
                  "MIGX_id":44,
                  "field":"pagetitle",
                  "caption":"Event Title",
                  "description":"",
                  "description_is_code":"0",
                  "inputTV":"",
                  "inputTVtype":"",
                  "validation":"required",
                  "configs":"",
                  "restrictive_condition":"",
                  "display":"",
                  "sourceFrom":"config",
                  "sources":"",
                  "inputOptionValues":"",
                  "default":"",
                  "pos":3
                },
                {
                  "MIGX_id":52,
                  "field":"description",
                  "caption":"Subtitle \/ Caption",
                  "description":"The event slogan or subject matter.",
                  "description_is_code":"0",
                  "inputTV":"",
                  "inputTVtype":"",
                  "validation":"",
                  "configs":"",
                  "restrictive_condition":"",
                  "display":"",
                  "sourceFrom":"config",
                  "sources":"",
                  "inputOptionValues":"",
                  "default":"",
                  "pos":4
                },
                {
                  "MIGX_id":56,
                  "field":"eventschedule",
                  "caption":"Event Schedule",
                  "description":"",
                  "description_is_code":"0",
                  "inputTV":"eventSchedule",
                  "inputTVtype":"migx",
                  "validation":"",
                  "configs":"",
                  "restrictive_condition":"",
                  "display":"",
                  "sourceFrom":"config",
                  "sources":"",
                  "inputOptionValues":"",
                  "default":"",
                  "pos":5
                },
                {
                  "MIGX_id":45,
                  "field":"template",
                  "caption":"Template",
                  "description":"",
                  "description_is_code":"0",
                  "inputTV":"",
                  "inputTVtype":"hidden",
                  "validation":"",
                  "configs":"",
                  "restrictive_condition":"",
                  "display":"",
                  "sourceFrom":"config",
                  "sources":"",
                  "inputOptionValues":"",
                  "default":3,
                  "pos":6
                },
                {
                  "MIGX_id":46,
                  "field":"show_in_tree",
                  "caption":"Show in tree",
                  "description":"",
                  "description_is_code":"0",
                  "inputTV":"",
                  "inputTVtype":"listbox",
                  "validation":"",
                  "configs":"",
                  "restrictive_condition":"",
                  "display":"none",
                  "sourceFrom":"config",
                  "sources":"",
                  "inputOptionValues":"no==||yes==1",
                  "default":"",
                  "pos":7
                },
                {
                  "MIGX_id":59,
                  "field":"venueaddress",
                  "caption":"Event Venue",
                  "description":"",
                  "description_is_code":"0",
                  "inputTV":"venueaddress",
                  "inputTVtype":"migxdb",
                  "validation":"",
                  "configs":"",
                  "restrictive_condition":"",
                  "display":"",
                  "sourceFrom":"config",
                  "sources":"",
                  "inputOptionValues":"",
                  "default":"",
                  "pos":8
                }
              ],
              "pos":1
            },
            {
              "MIGX_id":17,
              "caption":"Content",
              "print_before_tabs":"0",
              "fields":[
                {
                  "MIGX_id":47,
                  "field":"content",
                  "caption":"Content",
                  "description":"",
                  "description_is_code":"0",
                  "inputTV":"",
                  "inputTVtype":"richtext",
                  "validation":"",
                  "configs":"",
                  "restrictive_condition":"",
                  "display":"",
                  "sourceFrom":"config",
                  "sources":"",
                  "inputOptionValues":"",
                  "default":"",
                  "pos":1
                }
              ],
              "pos":2
            }
          ],
          "contextmenus":"update||duplicate||recall_remove_delete||remove",
          "actionbuttons":"addItem||bulk||toggletrash",
          "columnbuttons":"update||publish||unpublish",
          "filters":[
            {
              "MIGX_id":2,
              "name":"eventsfilter",
              "label":"Events Filter",
              "emptytext":"- Event Status -",
              "type":"combobox",
              "getlistwhere":"[[migxFilterevents]]",
              "getcomboprocessor":"getTVcombo",
              "combotextfield":"eventsfiltercombo",
              "comboidfield":"",
              "comboparent":"",
              "default":""
            },
            {
              "MIGX_id":1,
              "name":"search",
              "label":"search",
              "emptytext":"search...",
              "type":"textbox",
              "getlistwhere":{
                "pagetitle:LIKE":"%[[+search]]%",
                "OR:longtitle:LIKE":"%[[+search]]%",
                "OR:content:LIKE":"%[[+search]]%"
              },
              "getcomboprocessor":"",
              "combotextfield":"",
              "comboidfield":"",
              "comboparent":""
            }
          ],
          "extended":{
            "migx_add":"Add Event",
            "disable_add_item":"",
            "formcaption":"Create\/Edit Event",
            "update_win_title":"MFAGC Events Manager",
            "win_id":"events",
            "maxRecords":"",
            "addNewItemAt":"bottom",
            "multiple_formtabs":"",
            "actionbuttonsperrow":3,
            "winbuttonslist":"",
            "extrahandlers":"this.handlePositionSelector||this.handleColumnSwitch",
            "filtersperrow":4,
            "packageName":"migxchildresources",
            "classname":"modResource",
            "task":"",
            "getlistsort":"eventstart",
            "getlistsortdir":"DESC",
            "sortconfig":"",
            "gridpagesize":"",
            "use_custom_prefix":"0",
            "prefix":"",
            "grid":"",
            "gridload_mode":1,
            "check_resid":1,
            "check_resid_TV":"",
            "join_alias":"",
            "has_jointable":"yes",
            "getlistwhere":"",
            "joins":[
              {
                "alias":"CreatedBy"
              }
            ],
            "cmpmaincaption":"",
            "cmptabcaption":"",
            "cmptabdescription":"",
            "cmptabcontroller":"",
            "winbuttons":"",
            "onsubmitsuccess":"",
            "submitparams":""
          },
          "columns":[
            {
              "MIGX_id":1,
              "header":"ID",
              "dataIndex":"id",
              "width":10,
              "renderer":"",
              "sortable":true,
              "show_in_grid":1
            },
            {
              "MIGX_id":2,
              "header":"Pagetitle",
              "dataIndex":"pagetitle",
              "width":30,
              "renderer":"this.renderRowActions",
              "sortable":true,
              "show_in_grid":1
            },
            {
              "MIGX_id":12,
              "header":"Start Date",
              "dataIndex":"eventstart",
              "width":40,
              "sortable":true,
              "show_in_grid":1,
              "renderer":"",
              "clickaction":"",
              "selectorconfig":"",
              "renderchunktpl":"",
              "renderoptions":""
            },
            {
              "MIGX_id":13,
              "header":"End Date",
              "dataIndex":"eventend",
              "width":40,
              "sortable":true,
              "show_in_grid":1,
              "renderer":"",
              "clickaction":"",
              "selectorconfig":"",
              "renderchunktpl":"",
              "renderoptions":""
            },
            {
              "MIGX_id":4,
              "header":"",
              "dataIndex":"deleted",
              "width":"",
              "renderer":"",
              "sortable":"false",
              "show_in_grid":"0"
            },
            {
              "MIGX_id":3,
              "header":"Published",
              "dataIndex":"published",
              "width":10,
              "sortable":"false",
              "show_in_grid":1,
              "renderer":"this.renderSwitchStatusOptions",
              "clickaction":"switchOption",
              "selectorconfig":"",
              "renderoptions":[
                {
                  "MIGX_id":1,
                  "name":"publish",
                  "value":"0",
                  "clickaction":"",
                  "handler":"",
                  "image":"assets\/components\/migx\/style\/images\/cross.png"
                },
                {
                  "MIGX_id":2,
                  "name":"unpublish",
                  "value":1,
                  "clickaction":"",
                  "handler":"",
                  "image":"assets\/components\/migx\/style\/images\/tick.png"
                }
              ]
            },
            {
              "MIGX_id":6,
              "header":"Show in Tree",
              "dataIndex":"show_in_tree",
              "width":10,
              "sortable":"false",
              "show_in_grid":1,
              "renderer":"this.renderSwitchStatusOptions",
              "clickaction":"switchOption",
              "selectorconfig":"",
              "renderchunktpl":"",
              "renderoptions":[
                {
                  "MIGX_id":1,
                  "name":"showintree",
                  "value":"0",
                  "clickaction":"",
                  "handler":"",
                  "image":"assets\/components\/migx\/style\/images\/cross.png"
                },
                {
                  "MIGX_id":2,
                  "name":"shownotintree",
                  "value":1,
                  "clickaction":"",
                  "handler":"",
                  "image":"assets\/components\/migx\/style\/images\/tick.png"
                }
              ]
            }
          ]
        }
        


        And also the configuration of your MIGX-TV.

        Input type: migx

        Form Tabs:

        [
            {"caption":"Image Properties", "fields": [
                {"field":"date","caption":"Meeting Time","inputTVtype":"date"},
                {"field":"title","caption":"Meeting Title","inputTVtype":"text"}
            ]}
        ]
        


        Grid Columns:

        [
            {"header": "Meeting Time", "width": "160", "sortable": "true", "dataIndex": "date"},
            {"header": "Meeting Title", "width": "160", "sortable": "true", "dataIndex": "title"}
        ]
        


        The configuration is blank since it's being handled at the TV, not through the configurator.

        Is there anything else that would be helpful to see? Thank you.
        • discuss.answer
          • 49499
          • 48 Posts
          Great news! I solved this by creating a custom configuration for the migx TV via the configurator and setting up the formtabs and columns through the provided GUI instead of through the JSON configuration within the TV. It seems the only way to "nest" migx grids is to use the configurator.
          • discuss.answer
            • 4172
            • 5,888 Posts
            use either:

                      "inputTV":"eventSchedule",
                      "inputTVtype":"",
                      "validation":"",
                      "configs":"",


            or:

                      "inputTV":"",
                      "inputTVtype":"migx",
                      "validation":"",
                      "configs":"yourConfig",


            not both inputTV and inputTVtype
              -------------------------------

              you can buy me a beer, if you like MIGX

              http://webcmsolutions.de/migx.html

              Thanks!
              • 49499
              • 48 Posts
              Wow, thank you! That was such a simple adjustment. I think I'm still going to handle the MIGX TVs through the configurator because it seems more robust and easier to manage.

              Thanks again for the help!