These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

get field to email

nawaha
Registered: Jul 30 2011
Posts: 11
Answered

hy i'm totally new to java, i want to get a field value and use it to send an email with the entire pdf, i know the classic way send the pdf as an email like mailto:mymail [at] mail [dot] com and other preselcted mail, what i need is to use the email addres filled by user.
anyone can help me?

My Product Information:
Acrobat Pro 10.1, Macintosh
nawaha
Registered: Jul 30 2011
Posts: 11
Good Morning
i have a big issue an d none as an answer:
I did a form in acrobat and i need to make the buttons "mail, print, and reset" disappear when the user sent the file by email, just for a better looking of the email itself.
i tried different javascript but i'm not able to do it.
tanxs
Beans
Registered: Mar 8 2011
Posts: 7
nawaha wrote:
hy i'm totally new to java, i want to get a field value and use it to send an email with the entire pdf, i know the classic way send the pdf as an email like mailto:mymail [at] mail [dot] com and other preselcted mail, what i need is to use the email addres filled by user.
anyone can help me?
I'm not sure why you would need a field, that a user would input an email address in, and then use that field to populate the send "To" field of your email. Wouldn't the task be just the same as if the user had filled in the email address in the Send "To" field anyway?

If you have a consistant list of users that will need to receive this form, I would populate a "Listbox" with the typical receivers of your form.

You could then use the following script:

this.mailDoc(true,this.getField("ListBox").value+"@email location eg. yahoo.com", "CC", "BCC", "Subject", "Message Body");

You can substitute the "Listbox" for a "Text Field" if the users will be too varied.
Beans
Registered: Mar 8 2011
Posts: 7
nawaha wrote:
Good Morning
i have a big issue an d none as an answer:
I did a form in acrobat and i need to make the buttons "mail, print, and reset" disappear when the user sent the file by email, just for a better looking of the email itself.
i tried different javascript but i'm not able to do it.
tanxs
You should separate your questions into different posts.

You can have these buttons permanently dissapear from further use with:

this.removeField("");

You can also hide the buttons:

getField("Button1").hidden=true;
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Accepted Answer
Read this:
Form Submit/Email Demystified

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

nawaha
Registered: Jul 30 2011
Posts: 11
thanks thom