Component Options: Rule Templates

   MaestroThe UI design product.  |    Form Builder  |  All versions This feature is related to all versions.

Maestro allows you to create new and update existing rule templates for components using Component Options. You can use it to add custom rule types to a component. Once a rule is configured, you can run its JavaScript from another location of your form.

To create a new rule template using Component Options:

  1. Open a project in your organization.
  2. Select a component in the Component folder and click Edit Version.
  3. Click Component Options and select Rule Templates.
    Maestro view available rule templates
  4. Click New Rule Template to create a new rule template.
    Maestro create a new rule template
  5. Enter the Name for the new rule template. It automatically prefills the type of the rule and a JavaScript code required to execute it, for example: Form.fireRule("bigTextRuleTemplate", item, data).
    Note

    We recommended saving this code for your further reference as you will need it for an executable command later.

  6. Update the type of the rule in the Type field if you are not happy with the auto-suggested type.
  7. Click Create Default Script to edit a rule script.
    Maestro edit a JavaScript of a rule
  8. Click Done.

Next, learn how to add rule helpers.