Skip to main content
Inspiring
August 1, 2016
Answered

Add email button with icon

  • August 1, 2016
  • 1 reply
  • 4050 views

Hi,

I want to add a button at the end of my PDF doc to send the doc.

I shell use :addField ith "button" as the fieldType.

How can I specify the following:

  • set layout to: Icon top, label bottom
  • set label to "send form"
  • set and icon to a specific png file
  • set the action to "Submit a form"
  • Set Select Trigger to "Mouse Up"

Or perhaps to see all this, how can i see ALL the form and it's function properties? this would allow me to see the proper properties to set.

Thanks

This topic has been closed for replies.
Correct answer try67

The main idea of a forum is to help people find solutions, not to do their work for them...


It's really not that difficult to find what you're looking for. I'll help you with those items you asked about:

  • set layout to: Icon top, label bottom -> The buttonPosition property of the Field object.
  • set label to "send form" -> The buttonSetCaption method of the Field object.
  • set and icon to a specific png file -> The buttonSetIcon or buttonImportIcon methods of the Field object.
  • set the action to "Submit a form" -> Not possible. You can only assign a JS command using a script. But you can use JS to submit the document, using the submitForm method of the Document object.
  • Set Select Trigger to "Mouse Up" -> The setAction method of the Field object.

1 reply

try67
Community Expert
Community Expert
August 1, 2016

You should download the Acrobat JavaScript API Reference and study it, especially the part about the properties and methods associated with the Field object. It's all there.

karpiyonAuthor
Inspiring
August 1, 2016

I have...

I was hoping that someone who is very familiar with these functions can help me and save me from reading all of it and trying to study it thoroughly.

It this not the main idea of a forum?

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
August 1, 2016

The main idea of a forum is to help people find solutions, not to do their work for them...


It's really not that difficult to find what you're looking for. I'll help you with those items you asked about:

  • set layout to: Icon top, label bottom -> The buttonPosition property of the Field object.
  • set label to "send form" -> The buttonSetCaption method of the Field object.
  • set and icon to a specific png file -> The buttonSetIcon or buttonImportIcon methods of the Field object.
  • set the action to "Submit a form" -> Not possible. You can only assign a JS command using a script. But you can use JS to submit the document, using the submitForm method of the Document object.
  • Set Select Trigger to "Mouse Up" -> The setAction method of the Field object.