We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 9995
    • 1,613 Posts
    I have a site where I need to hide the content field (back-end) on some resources.
    Can be done in mm_rules like this:

    if($id == 28){
    mm_hideFields('content');
    }

    But I have to hide content field on all resources except for ID 28,29,30.
    How can I do this?

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

      Evolution user, I like the back-end speed and simplicity smiley
    • discuss.answer
      • 4041
      • 788 Posts
      this should work:
      // add doc ids where the content field will appear
      $valid = array( '28', '29', '30' );
      
      if( !in_array( $id, $valid ) ){
          
          mm_hideFields( 'content' );
      
      }
        xforum
        http://frsbuilders.net (under construction) forum for evolution
        • 9995
        • 1,613 Posts
        thanks! bookmarked smiley
          Evolution user, I like the back-end speed and simplicity smiley
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          ManagerManager is one of the things I miss most about working with Evo. It is a brilliant piece of work. Revo's form customization doesn't match it.
            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
            • 9995
            • 1,613 Posts
            I'm not using it for a long time now but it's very handy indeed no doubt.

            What I hate about it is that the sort order doesn't work.

            When I add a mm rule like:
            mm_createTab('Slider', 'slider', '', '3', '<p>Add sliders here:</p>', '650');
            mm_moveFieldsToTab('slider-img-01', 'slider');
            mm_moveFieldsToTab('slider-img-02', 'slider');
            mm_moveFieldsToTab('slider-img-03', 'slider');
            etc..


            There is no way to order these TV's, it looks at publish date I think but not always?
            When I have added like 8 slider-img's I'm not able to add a "slider-header-01" field in good order between the "slider-img-01" and "slider-img-02". Its placed below the last img field..

            I have never figured out how to order this.
              Evolution user, I like the back-end speed and simplicity smiley