We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 30223
    • 1,010 Posts
    That is probably because MM lists the fieldname for content as ’content’ (see mm.inc.php line 94).

    What you can try to do is to add another line in mm.inc.php after line 94 with
    'bodycontent' => array('fieldtype'=>'textarea', 'fieldname'=>'ta'),

    (this way you’re not messing with anything else)

    and then use
    mm_requireFields('pagetitle,bodycontent,tveventStartDate,tveventEndDate,tveventVenue,tveventAddress', '3,4,6', '10');


    Just be aware that if your using an RTE such as tinyMce you will not have the content field highlighted if it’s empty. This may also be counter-intuitive... The content field may contain html tags and still produce an empty page... mm_requireFields will not pick that up!
      • 19309
      • 49 Posts
      Perhaps someone has an idea how to fix a strange error message I get instead of the mm_requireFields functionality.

      I have uploaded the fields.required.inc.php and included a simple rule to test it out. But instead of the mm_requireFields functionality I receive this error message:

      ManagerManager: An error has occurred: TypeError - $("#mutateContent") is null


      Seems to be a problem with line 19 in fields.required.inc.php

      $output .= '$("#mutateContent").bind("submit", function(){ var count=0; var msg = "";'."\n";


      Any ideas? Or anyone who has the same problem?
        • 16842
        • 4 Posts
        Yep, I’m getting the same problem. Not sure why yet, I’m still working on it.
          • 21056
          • 327 Posts
          As of version 0.3.8, you can make fields required.
            Author: ManagerManager plugin - customise your ModX manager interface

            Rckt - web development, Sheffield, UK
            • 23490
            • 5 Posts
            Not sure if this is the best place to post this, but...

            The documentation for this feature is incorrect. As of today, the docs included in the official download (http://modxcms.com/extras/package/?package=255) state that the function is called "mm_require_fields". This is incorrect, the function is spelled "mm_requireFields" (camel-case without the underscore).

            Just a heads up to the author of the plugin/docs.

            -Mike
            [email protected]