We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 41840
    • 3 Posts
    I can't for the life of me figure out what I'm doing wrong. I can't find any video, documentation, forum post or tutorial explaining a Form Customization constraint per document.

    I'm simply trying to hide a TV in use on Home(1) document but not on the About(5) document from everyone.

    I have my set and rule setup with modResource.id = 5 with the TV that I don't want unchecked. The rules are set to active with the appropriate template (tried with blank template too. However, this seems to take it away from all pages, not just 5.

      • 3109 ☆ A M B ☆
      • 894 Posts
      Shaw,

      You just need to put ID in the Constraint Field and the number of the resource in the Constraint.

      Check out my MODX Form Customization tutorial it might help.
        Benjamin Marte
        Interactive Media Developer
        Follow Me on Twitter | Visit my site | Learn MODX
        • 41840
        • 3 Posts
        Read your tutorial before posting... which sent me in the right direction, thanks! However, all that is mentioned about constraints concerning my problem is "Constraint Fields can be any MODX tag or Template Variable "

        An ID is a modx tag. I've also tried pagetitle, and others. Nothing works. If I need to include modDocument or something else I havn't seen it in any documentation.

        UPDATE: Seems at least 1 other person is having this same exact issue, 2 days ago, http://tracker.modx.com/issues/9012

        XAMPP on localhost, 2.2.5-pl
        Thanks again though. [ed. note: [email protected] last edited this post 13 years, 11 months ago.]
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          It's been bumped to 2.3, so I wouldn't expect it to be fixed any time soon. Maybe the whole thing will be improved in MODx3. ManagerManager is one of the things I really miss about Evo; the mm_rules chunk could take PHP code, so you could set up all the conditionals you wanted.
            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
            • 40045
            • 534 Posts
            yeah, had that problem as well (as can be seen on the tracker ticket =D) and no solution to it (still)...don't know why it is such a big thing to fix (if it's integrated and planned), but I dont see deep enough into the core code to be able to say exactly where the problem lies =/
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              It's really annoying to have to make what is nothing more than a duplicate of the site's three-column template to accommodate the home page and the TVs only needed for handling home page content. With ManagerManager, I could just use PHP code to say "if the resource is not the site_start resource, then apply this rule to hide these TVs".

              Although I am hot on the trail of a method of having the template equivalent of symlink resources; a way to have a template that simply pulls in the content of another, specified template. This would eliminate most of the annoyance of having to have a bunch of duplicated templates just to manage the TVs.
                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