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

    How can I create a MIGX input to allow multiple images to be saved against any document using the specified template (for an image gallary). The form needs to only comply with 1 image field, but allow multiple images to be added. Then using something like fancybox to display the images.

    This question has been answered by Bruno17. See the first response.

    • discuss.answer
      • 4172
      • 5,888 Posts
      configure the formtabs with just one image-field:

      [{"caption":"Image","fields":[{"field":"image","caption":"Image","inputTVtype":"image"}]}]


      then add any fancybox - javascript to your template and code the tpl-chunk for getImageList as needed for your fancybox-script.

        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        I'd recommend adding a field for "title" at least (like the code in the rtfm documentation), as you never know when the client is going to decide he wants a title or a caption (I speak from experience!). The field won't hurt anything if it's left empty.
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
          • 47401
          • 295 Posts
          thanks guys much appreciated for all your feedback smiley