We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22840
    • 1,572 Posts
    Hi Bruno,

    I get the following:

    Array
    (
        [MIGX_id] => 3
        [description] => Manual ( pdf ) some text here
        [size] => 13.64
        [language] => English
        [file] => 
        [_alt] => 0
        [_first] => 1
        [_last] => 1
        [idx] => 1
    )


    Thanks
      • 22840
      • 1,572 Posts
      Ok although this has created a upload from within MIGX it has also created one outside of it which it is taking its value from sad
        • 4172
        • 5,888 Posts
        with firebug you can see the generated value after choosing a file and saving the form with 'done'

        above the 'add item' - button there should be something like that:

        <div class="x-form-element modx-tv-form-element">
                    <input type="hidden" id="tvdef1" value="">
                    <input id="tv1" name="tv1" type="hidden" class="textfield" value="[{" tvtype="migx" migx_id":"1","title":"test","description":"","image":"milowstp61884.jpg","image2":"assets="" images="" layout1.jpg","date":"","placeholder":"","file":"assets="" _m6x2279.jpg"},{"migx_id":"2","title":"test","description":"","image":"milowstp61885.jpg","image2":"assets="" __cs2263.jpg","date":"","placeholder":""}]"="">
        <div id="tvpanel1" style="width:650px">
        


        what do you have in the value of your TV after clicking done?
          -------------------------------

          you can buy me a beer, if you like MIGX

          http://webcmsolutions.de/migx.html

          Thanks!
          • 4172
          • 5,888 Posts
          you need just to create a file-TV without any template-binding.
          name it for example 'manualfile' and use this TV for the file-field like that:

          do not assign the TVs you use in MIGX to any Template!
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
            • 22840
            • 1,572 Posts
            Thanks for the help Bruno,

            Looks like adding it to the template was the problem, I deleted that one and made a new one and everything is working now.

            Many thanks for your help on this.

            Cheers
              • 22897 ☆ A M B ☆
              • 209 Posts
              I am using 2.2 RC1 with MIGX from Github (lastest master, updated 16 Nov 2011). It works great, however every field when adding/editing a row shows as a standard text input; file upload, image upload, RTE etc all show as standard text inputs.

              What am I doing wrong?

              Many thanks,
              Peter
                MAPLEDESIGN MODX development and MODX web design and custom development. Proud to serve UK and International clients!
                • 4172
                • 5,888 Posts
                what's in your TVs input-options formTabs-field?
                  -------------------------------

                  you can buy me a beer, if you like MIGX

                  http://webcmsolutions.de/migx.html

                  Thanks!
                  • 22897 ☆ A M B ☆
                  • 209 Posts
                  Here we are:

                  [{
                    "caption":"Product",
                    "fields": [{
                      "field":"product_key",
                      "caption":"Key"
                    },{
                      "field":"product_title",
                      "caption":"Title"
                    },{
                      "field":"product_description",
                      "caption":"Description"
                    },{
                      "field":"product_price",
                      "caption":"Price"
                    },{
                      "field":"product_image",
                      "caption":"Image"
                    },{
                      "field":"product_atp_price",
                      "caption":"ATP price"
                    },{
                      "field":"sku_key",
                      "caption":"Internal key",
                      "description": "The value from system X"
                    }]
                  }]
                    MAPLEDESIGN MODX development and MODX web design and custom development. Proud to serve UK and International clients!
                    • 4172
                    • 5,888 Posts
                    if you want to have a image-upload field for example, then

                    create a image-TV name it for example 'image'

                    and add ,"inputTV":"image" to this field:

                    [{
                      "caption":"Product",
                      "fields": [{
                        "field":"product_key",
                        "caption":"Key"
                      },{
                        "field":"product_title",
                        "caption":"Title"
                      },{
                        "field":"product_description",
                        "caption":"Description"
                      },{
                        "field":"product_price",
                        "caption":"Price"
                      },{
                        "field":"product_image",
                        "caption":"Image",
                        "inputTV":"image"
                      },{
                        "field":"product_atp_price",
                        "caption":"ATP price"
                      },{
                        "field":"sku_key",
                        "caption":"Internal key",
                        "description": "The value from system X"
                      }]
                    }]


                    see also:
                    http://rtfm.modx.com/display/ADDON/MIGX.Backend-Usage
                      -------------------------------

                      you can buy me a beer, if you like MIGX

                      http://webcmsolutions.de/migx.html

                      Thanks!
                      • 22897 ☆ A M B ☆
                      • 209 Posts
                      Thanks Bruno, I didn't understand why this was needed (as when creating the TV I'd defined what it was) so missed it out.

                      The example you pasted above didn't work for me. What I hadn't realised was inputTV was the name of an actual TV, not the 'type' of TV (the RTFM page uses TV's called 'image' and 'richtext', which is a little confusing). Here's the working version for others to reference:

                      [{
                        "caption":"Product",
                        "fields": [{
                          "field":"product_key",
                          "caption":"Key"
                        },{
                          "field":"product_title",
                          "caption":"Title"
                        },{
                          "field":"product_description",
                          "caption":"Description",
                          "inputTV":"product_description"
                        },{
                          "field":"product_price",
                          "caption":"Price"
                        },{
                          "field":"product_image",
                          "caption":"Image",
                          "inputTV":"product_image"
                        },{
                          "field":"product_atp_price",
                          "caption":"ATP price"
                        },{
                          "field":"sku_key",
                          "caption":"Internal key",
                          "description": "The value from system X"
                        }]
                      }]
                        MAPLEDESIGN MODX development and MODX web design and custom development. Proud to serve UK and International clients!

                      This discussion is closed to further replies. Keep calm and carry on.