We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 43338
    • 4 Posts
    I am having trouble setting up a MIGXdb which has a MIGX TV as a field.

    My fields are:

    ID Fieldname Caption InputTV
    1 name Name
    2 price Price
    3 options Options productOptionsTV

    The productOptionsTV is setup like so:
    {"caption":"Product Options", "fields": [
        {"field":"optionTitle","caption":"Title"},
        {"field":"optionPrice","caption":"Price"}
    ]}



    [
    {"header": "Title", "width": "160", "sortable": "true", "dataIndex": "optionTitle"},
    {"header": "Price", "width": "50", "sortable": "false", "dataIndex": "optionPrice"}
    ]


    When I try to create a new record the column headers appear where you would expect when adding migx records but when the modal window open there are no fields displayed.

    I have tried digging through firebug to compare migx that works but I can see no difference.

    action	mgr/fields
    autoinc	0
    class_key	modDocument
    co_id	new
    configs	
    isnew	1
    itemid	0
    record_json	[{"optionTitle":"","optionPrice":""}]
    resource_id	1
    tv_id	993
    tv_name	productOptionsTV
    wctx	web


    I thought it might by the tv_id but other migx that I have seen, seem to work so I assume this is an extjs identifier.

    Help would be much appreciated.
      • 43338
      • 4 Posts
      After reading the example below I found I needed a config file.
      http://rtfm.modx.com/display/ADDON/MIGXdb.Manage+Child-Resources+in+a+grid-TV+with+help+of+MIGXdb#MIGXdb.ManageChild-Resourcesinagrid-TVwithhelpofMIGXdb-CreatetheConfiguration

      /core/components/migx/configs/productoptions.config.inc.php
      $this->customconfigs['includeTVs'] = 1;
      $this->customconfigs['includeTVList'] = 'productOptionsTV';


      The docs suggested this file should have been automatically created but it wasn't, so maybe i have gone wrong somewhere in my setup.?