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
BedrockMission!

Learn More

View all

Sign in to view all badges

Email form using JavaScript

Avatar

Avatar
Validate 1
Level 4
Aditya_S_
Level 4

Like

1 like

Total Posts

315 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 4
Aditya_S_
Level 4

Like

1 like

Total Posts

315 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
Aditya_S_
Level 4

18-02-2009

I would like to perform certain validations when user clicks the email button. However, I am unable to enter any JavaScript in the click event. This event is disabled.



Is there a way to email a form using JavaScript (not through the Submit tab)? This way I can run the validations in the click event, before emailing the form.



Any other suggestions are welcome.



Thanks

Aditya

Replies

Avatar

Avatar
Boost 1
Level 2
Allta_Media
Level 2

Like

1 like

Total Posts

31 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 2
Allta_Media
Level 2

Like

1 like

Total Posts

31 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile
Allta_Media
Level 2

19-02-2009

Thom Parker has an article on the four different functions you can use to send e-mail from a PDF -- these are AcroForm Javascript functions that also work in LiveCycle form:

http://www.acrobatusers.com/tutorials/dynamically-setting-submit-e-mail-address

Avatar

Avatar
Validate 1
Level 9
Steve_L_Walker
Level 9

Likes

197 likes

Total Posts

1,435 posts

Correct Reply

212 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 25
View profile

Avatar
Validate 1
Level 9
Steve_L_Walker
Level 9

Likes

197 likes

Total Posts

1,435 posts

Correct Reply

212 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 25
View profile
Steve_L_Walker
Level 9

20-02-2009

Aditya,



A common solution is to use two buttons. Add a Email Submit Button object and define the presence as 'invisible'. Let's name the object 'EmailSubmitBtn'. Add a Button object and change the caption to 'Email'. Let's call the object 'EmailBtn'. One the 'EmailBtn' click event perform the required validations and then call the click event on the 'EmailSubmitBtn'. You call the 'EmailSubmitBtn' click event as follows:



form1.subform1.EmailSubmitBtn.execEvent("click");



Steve