Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

script to force Highlights On when user opens form?

Avatar

Level 1

I am wondering if there is a way to ensure that the Highlight feature in Reader is on when someone opens my form. This will help them to see where they have to enter information. Can I include a script in my form to do this?

Thank you for any assistance.

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

If you select the root / parent in the hierarchy (form1) and put the following javascript in the docReady event:

app.runtimeHighlight = true; 

This will turn on the light blue shading to all fields and give a red border to required fields. It is a good idea to put the following in the docClose event so that when the user opens a different form, the Highlight is off.

app.runtimeHighlight = false; 

Hope that helps,

Niall

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

Hi,

If you select the root / parent in the hierarchy (form1) and put the following javascript in the docReady event:

app.runtimeHighlight = true; 

This will turn on the light blue shading to all fields and give a red border to required fields. It is a good idea to put the following in the docClose event so that when the user opens a different form, the Highlight is off.

app.runtimeHighlight = false; 

Hope that helps,

Niall

Avatar

Level 1

Hi Niall,

Thanks for this information. It works perfectly!

JJ