Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

Change Event problem

Avatar

Level 2

Is there anything wrong with this code?

if(this.rawValue == 1 &&form1.Data.options.feesG.fees == 1)

{

form1.Page1Subform.Space.presence = "hidden";

}

else

{

form1.Page1Subform.Space.presence = "visible";

}

When I put it in the change event of a checkbox, I receive a Runtime error and LC shuts down.

Any help would be appreciated.

thanks.

2 Replies

Avatar

Level 10

The only thing is the second condition should have a rawvalue on it ....also ....I would wrap the different conditions in their own brackets like this:

If ((this.rawValue == 1) && (for,m1.Data.options.feesG.fees.rawValue == 1))

Neither of those should cause a crash ...if it continues post the form and I will have a look.

paul

Avatar

Level 2

Thank you Paul.

Fixed the code and put it in the change event of a Radio Button and the form works the way I need it to.

The ultimate experience is back.

Join us in Vegas to build skills, learn from the world's top brands, and be inspired.

Register Now