Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.
SOLVED

Need FormCalc script to call a hidden button

Avatar

Level 7

I have a FormCalc script on the Click event of the Submit by Email button. I need to call a second hidden button that uses a JavaScript on click to send the form via email.

Each button works correctly on its own, but I'm having trouble with the script to make the displayed button call the hidden button.

Thanks,

MDawn

1 Accepted Solution

Avatar

Correct answer by
Level 10

You can use the exeEvent method of the hidden button.

In the below example I am executing the Click event of Button1 from a different control.

Replace Button1 with your control's full access path and the event name.

Button1.execEvent("click");

Thanks

Srini

View solution in original post

1 Reply

Avatar

Correct answer by
Level 10

You can use the exeEvent method of the hidden button.

In the below example I am executing the Click event of Button1 from a different control.

Replace Button1 with your control's full access path and the event name.

Button1.execEvent("click");

Thanks

Srini