We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37984
    • 215 Posts
    Hey all. Working on a mini-store, and the store items will be contained within a MIGX tv. I would like to make certain fields within this TV required, so that the client cannot forget them. I've tried creating field TV outside of MIGX, making it required, and referencing it in my MIGX Form Tabs JSON, and also tried this JSON string:

    {"field":"item-title","caption":"Title","required":"true"}


    Neither of these work; I was allowed to click done in the MIGX TV regardless of having left the required fields empty. Does anyone have any other ideas on how to pull this off? I've searched this forum and the documentation and can't find much.
      Jesse Couch
      MODX Aficionado, Front-End Designer & Developer
      http://www.designcouch.com
      • 4172
      • 5,888 Posts
      Didn't play much with validation inside a MIGX-TV and I think this isn't working.

      But if you would save your store-items into a custom-table (which may have some more advantages), you could use a MIGXdb-TV instaed.
      With 2.5.11 there is a simple server-side validation for MIGXdb now within the default update-processor:
      https://github.com/Bruno17/MIGX/commit/2f259cad430effb903fb63cbf84129b868d138b8

      There is a new configuration in the field-configuration-view 'validation'.
      Just put the word 'required' into that field, for required fields.

      see also this discussion, where this was asked for MIGXdb:
      https://forums.modx.com/thread/87964/migxdb-custom-processors-question#dis-post-484322


      [ed. note: Bruno17 last edited this post 12 years, 10 months ago.]
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!