Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session

AEM Forms Rules Editor

Avatar

Level 10

Hi all,

I have seen that AEM Forms Rules Editor is very simple and easy to use.

But in some forms, we need to write some Java Script code in the Code Editor, to hide and show some Radio button panels.

In this context, is it a good system to create, given that Marketing people are required to know JS?

Is there a solution to this problem, where we configure all these at the template level and ask marketing people to do these changes on the form, only if it absolutely required?

My question, rather, is how to use AEM Forms Rules Editor at template level, in addition to Page Level?

Appreciate all your replies.

Thanks,

Rama.

3 Replies

Avatar

Level 8

I'd be interested in hearing the use case where the rule builder wouldn't suffice to hide/show a panel.  Also is this a common element that a fragment wouldn't be a potential option?

Avatar

Level 10

Hi Steve,

Thanks for responding quickly.

As long as this is just a drag and drop, Marketing people (Forms authors) will be able to do.

I did JS coding, probably wrongly, to hide and show radio button panels and to hide all of them on loading.

But what is the application of Code Editor in Rules Editor? When do we use it?

In those cases, how do we ask Marketing people to code?

Thanks,

Rama.

Avatar

Level 3

RNYSHADH SHADH wrote...

But what is the application of Code Editor in Rules Editor? When do we use it?

In those cases, how do we ask Marketing people to code?

Code Editor was built for a developer persona to write complex rules. It is never meant to be used by a marketing guy. In fact, for 6.3, we have added another layer of security for code editor to be usable only for a particular set of users and not all.

If you have a complex rule in your form which is to be re-used, you could create a fragment and pre-bake the rules in the fragment. This way, the marketing guy just has to drop the fragment with rules pre-configured.

For complex rule to be maintainable with time, you could also create a custom javascript function in a client library with proper JS DOCS. You could find more details on this at [1] under "Custom functions in rule editor" section.

[1] https://helpx.adobe.com/aem-forms/6-2/rule-editor.html