MODX Cloud

The Most Productive MODX Learning Playground Ever

Claim Free Lab Account

Form Customization Rules

Skip to end of metadata
Go to start of metadata


What is a Rule?

Rules in MODx Revolution are simply generic rules that apply to any Action (manager page). They also can be tied to User Groups, wherein a Rule will only be applied if the User is part of that User Group.

What are the Rules available?

The available Rules are:

Creating a Rule

First off, go to the Form Customization page, under the Security main menu. From there, click "Add" in the grid's toolbar. You'll be presented with a window:

Let's go into the fields.

Field Description Optional
Action This field lets you select any available Action. The rule will only apply to that Action, and no other. No
User Group Here you can optionally choose a User Group to tie this Rule to. If a User Group is chosen, the Rule will only apply to Users of that User Group. Yes
Description An optional, for you, description of the Rule. Yes
Field The name of the field or tab to apply the Rule to. No
Containing Panel The name of the containing panel that the Field or Tab exists in. Most all Rules will need this value. No
Value The value you'd like to set the Rule to. The type of value can vary depending on the Rule. No
Constraint Class If set, will restrict the Rule to a field value (via Constraint Field and Constraint) on this class. Example: modResource for the Resource Update screen. Yes
Constraint Field If set, will restrict the Rule to the field specified, with the value of Constraint Yes
Constraint If set, will restrict the Rule to the value of the field in the object specified in the constraint options. Yes

Constraints

Rule Constraints are special abilities that let you restrict the Rule to a certain value on an object's field. Let's say you want to restrict a Rule for resource/update to only occur on Resource's with a Template ID of 4. You'd simply set the Constraints like so:

  • Constraint Class: modResource
  • Constraint Field: template
  • Constraint: 4

Or, further, if you wanted to restrict the Rule to Resources with a menutitle of "boo":

  • Constraint Class: modResource
  • Constraint Field: menutitle
  • Constraint: boo

Constraints allow a superior level of flexibity to Form Customization Rules.

See Also

Labels

manager manager Delete
custom custom Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.