AEM Forms Rules Editor

Avatar

Avatar
Contributor 2
Level 8
AEM_Forum
Level 8

Likes

147 likes

Total Posts

631 posts

Correct reply

4 solutions
Top badges earned
Contributor 2
Validate 100
Validate 50
Validate 25
Validate 10
View profile

Avatar
Contributor 2
Level 8
AEM_Forum
Level 8

Likes

147 likes

Total Posts

631 posts

Correct reply

4 solutions
Top badges earned
Contributor 2
Validate 100
Validate 50
Validate 25
Validate 10
View profile
AEM_Forum
Level 8

12-12-2016

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.

Accepted Solutions (0)

Answers (3)

Answers (3)

Avatar

Avatar
Boost 1
Level 2
rishim22446870
Level 2

Likes

2 likes

Total Posts

32 posts

Correct reply

12 solutions
Top badges earned
Boost 1
Affirm 5
Affirm 3
Affirm 10
Affirm 1
View profile

Avatar
Boost 1
Level 2
rishim22446870
Level 2

Likes

2 likes

Total Posts

32 posts

Correct reply

12 solutions
Top badges earned
Boost 1
Affirm 5
Affirm 3
Affirm 10
Affirm 1
View profile
rishim22446870
Level 2

12-12-2016

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

Avatar

Avatar
Contributor 2
Level 8
AEM_Forum
Level 8

Likes

147 likes

Total Posts

631 posts

Correct reply

4 solutions
Top badges earned
Contributor 2
Validate 100
Validate 50
Validate 25
Validate 10
View profile

Avatar
Contributor 2
Level 8
AEM_Forum
Level 8

Likes

147 likes

Total Posts

631 posts

Correct reply

4 solutions
Top badges earned
Contributor 2
Validate 100
Validate 50
Validate 25
Validate 10
View profile
AEM_Forum
Level 8

12-12-2016

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

Avatar
Give Back 25
Level 5
TundraSteve
Level 5

Likes

51 likes

Total Posts

442 posts

Correct reply

57 solutions
Top badges earned
Give Back 25
Give Back 10
Give Back 5
Give Back 3
Give Back
View profile

Avatar
Give Back 25
Level 5
TundraSteve
Level 5

Likes

51 likes

Total Posts

442 posts

Correct reply

57 solutions
Top badges earned
Give Back 25
Give Back 10
Give Back 5
Give Back 3
Give Back
View profile
TundraSteve
Level 5

12-12-2016

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?