Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

Dynamically change send-to address of EmailSubmitButton

Avatar

Level 2

I'm modifying an access request form that we use. Depending on whether the request is for new access (for a new user) or a change to existing access, there may be more than one person who needs to receive the form. I need to know how to modify the EmailAddress property of the EmailSubmitButton in response to a selection from a RadioButton list. I'm not having much luck finding an object model or other resource I can use to examine and change the appropriate properties in JavaScript.

I'm hoping this is something that's been done alot and has some basic scripts already set up.

1 Reply

Avatar

Former Community Member

The email submit button was put in as a convenience to allow for people to simply drop and use a button for email. It was not intended to be adjusted or controlled programatically. In your case you can use a plain button and program it to use the Acrobat javascrip Maildoc api or youo can drop a button on the form, make it of type submit and use the mailto protocol to control the mail message.

Make sense?

Paul