Expand my Community achievements bar.

Automatically Populating Email Adresses

Avatar

Level 1

I have a form that needs to be sent to the user's general manager. The user enters the General Manager's email at the top of the form, and after filling out the form, clicks a "submit by email" button. Is there any way to make the email address line populate with the email address entered in the previous field?

5 Replies

Avatar

Level 10

Hi there,

if you have a submit button created by LiveCycle and you can't edit the click event of that button, you can do the following to change the mailto property

You can edit the target on the exit event of the Email Address Text Field, but make sure to validate the email

if you want to keep the subject with the new email, just add "?subject=" like the following

Hope this will help!

Avatar

Level 1

That doesn't seem to work, unfortunately.

Avatar

Level 10

Make sure your reference_syntax is correct.

Is there any error showing up?

Give details and it will be easier to assist you.

Avatar

Level 1

I apologize. I am not very good at coding. I named the email field  (GenlMgrEmail) and the email button GnlMgrButton, and this was how I entered them. When I saved and then user-enabled the form, I entered an email address in the email field and clicked the button but the email address did not appear in the to: field of the email. Thanks for any help you can give me.

Livecycle 1.png

Avatar

Level 10

Alright,

First :

on the left side of the line you have entered there is show : initialize*

this is the initialize event, so once the form is initialized, the code is executed, make sure you put the code in the right event (exit event)

Second:

You try to access SubmittoGenlMgrButton, but is it in the same subform of the object's event?

Ensure to use the right reference_syntax to access the submit button

If you are not sure what is the reference_syntax, you can generate it automatically by doing the following :

1. Make sure your Text_Cursor is in the code

2. Hold down Ctrl and click on the submit button

It will create the reference_syntax in the code to be able to access the button

If you want to know how to create the reference_syntax, you can use the Hierarchy Palette to help yourself know what nodes needs to be accessed before accessing the object wanted.

Hope this will help