{"id":85,"date":"2018-08-20T11:06:31","date_gmt":"2018-08-20T16:06:31","guid":{"rendered":"http:\/\/www.offtherichterdesign.com\/Blog\/?p=85"},"modified":"2018-12-12T15:35:53","modified_gmt":"2018-12-12T21:35:53","slug":"acro-javascript-custom-submit-button","status":"publish","type":"post","link":"https:\/\/offtherichterdesign.com\/Blog\/acro-javascript-custom-submit-button\/","title":{"rendered":"Acro-JavaScript: Custom Submit Button"},"content":{"rendered":"<p style=\"text-align: left;\"><strong>Developer Software Required:<\/strong> Adobe Acrobat A.K.A Adobe Acrobat Pro<br \/>\n<strong>End User Software Required:<\/strong> Adobe Reader A.K.A. Adobe Acrobat Reader<\/p>\n<p style=\"text-align: left;\">When a fillable .pdf is opened in Adobe Reader and filled in, typically the end user will save the .pdf with the contents entered, then email the document to the designated recipient. However, if you are the creator of these forms or if you have Adobe Acrobat, you can modify these forms to incorporate a custom submit button. This will effectively remove a few steps and make the process of sending .pdf documents more efficient for the end users!<\/p>\n<p style=\"text-align: left;\"><strong>Goal:<\/strong> End users will be able to fill in form then simply hit the submit button. An email will be drafted automatically with their default email client along with the attached form and the contents they entered.<\/p>\n<ol>\n<li style=\"text-align: left;\">To add the custom submit button, open the .pdf form in Adobe Acrobat and select <strong>Prepare Form<\/strong>.<a href=\"http:\/\/www.offtherichterdesign.com\/Blog\/wp-content\/uploads\/2018\/08\/Adobe-Acrobat-Prepare-Form.png\" data-rel=\"lightbox-image-0\" data-magnific_type=\"image\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-107 aligncenter\" src=\"http:\/\/www.offtherichterdesign.com\/Blog\/wp-content\/uploads\/2018\/08\/Adobe-Acrobat-Prepare-Form-94x300.png\" alt=\"Adobe Acrobat Prepare Form\" width=\"94\" height=\"300\" srcset=\"https:\/\/offtherichterdesign.com\/Blog\/wp-content\/uploads\/2018\/08\/Adobe-Acrobat-Prepare-Form-94x300.png 94w, https:\/\/offtherichterdesign.com\/Blog\/wp-content\/uploads\/2018\/08\/Adobe-Acrobat-Prepare-Form.png 229w\" sizes=\"auto, (max-width: 94px) 100vw, 94px\" \/><\/a><\/li>\n<li style=\"text-align: left;\">Insert a button and name it &#8220;Submit.&#8221;<a href=\"http:\/\/www.offtherichterdesign.com\/Blog\/wp-content\/uploads\/2018\/08\/Adobe-Acrobat-Insert-Button.png\" data-rel=\"lightbox-image-1\" data-magnific_type=\"image\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-108 aligncenter\" src=\"http:\/\/www.offtherichterdesign.com\/Blog\/wp-content\/uploads\/2018\/08\/Adobe-Acrobat-Insert-Button-300x43.png\" alt=\"Adobe Acrobat Insert Button\" width=\"300\" height=\"43\" srcset=\"https:\/\/offtherichterdesign.com\/Blog\/wp-content\/uploads\/2018\/08\/Adobe-Acrobat-Insert-Button-300x43.png 300w, https:\/\/offtherichterdesign.com\/Blog\/wp-content\/uploads\/2018\/08\/Adobe-Acrobat-Insert-Button-768x109.png 768w, https:\/\/offtherichterdesign.com\/Blog\/wp-content\/uploads\/2018\/08\/Adobe-Acrobat-Insert-Button-1024x145.png 1024w, https:\/\/offtherichterdesign.com\/Blog\/wp-content\/uploads\/2018\/08\/Adobe-Acrobat-Insert-Button.png 1058w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/li>\n<li style=\"text-align: left;\">Right-mouse click on the new submit button and select <strong>Properties<\/strong>. In the <strong>Button Properties<\/strong>, under the General tab, change the <strong>Form Field<\/strong> to <strong>Visible but doesn&#8217;t print<\/strong>.<a href=\"http:\/\/www.offtherichterdesign.com\/Blog\/wp-content\/uploads\/2018\/08\/Adobe-Acrobat-Button-Visibility.png\" data-rel=\"lightbox-image-2\" data-magnific_type=\"image\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-110 aligncenter\" src=\"http:\/\/www.offtherichterdesign.com\/Blog\/wp-content\/uploads\/2018\/08\/Adobe-Acrobat-Button-Visibility-300x275.png\" alt=\"Adobe Acrobat Button Visibility\" width=\"300\" height=\"275\" srcset=\"https:\/\/offtherichterdesign.com\/Blog\/wp-content\/uploads\/2018\/08\/Adobe-Acrobat-Button-Visibility-300x275.png 300w, https:\/\/offtherichterdesign.com\/Blog\/wp-content\/uploads\/2018\/08\/Adobe-Acrobat-Button-Visibility.png 523w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/li>\n<li style=\"text-align: left;\">Within the <strong>Button Properties<\/strong>, navigate to the <strong>Actions<\/strong> tab. Select <strong>Trigger: Mouse Up<\/strong>, Select <strong>Action: Run a JavaScript<\/strong>.<a href=\"http:\/\/www.offtherichterdesign.com\/Blog\/wp-content\/uploads\/2018\/08\/Adobe-Acrobat-Button-Actions.png\" data-rel=\"lightbox-image-3\" data-magnific_type=\"image\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-112 aligncenter\" src=\"http:\/\/www.offtherichterdesign.com\/Blog\/wp-content\/uploads\/2018\/08\/Adobe-Acrobat-Button-Actions-300x266.png\" alt=\"Adobe Acrobat Button Actions\" width=\"300\" height=\"266\" srcset=\"https:\/\/offtherichterdesign.com\/Blog\/wp-content\/uploads\/2018\/08\/Adobe-Acrobat-Button-Actions-300x266.png 300w, https:\/\/offtherichterdesign.com\/Blog\/wp-content\/uploads\/2018\/08\/Adobe-Acrobat-Button-Actions.png 620w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/li>\n<li style=\"text-align: left;\">Paste the following code into the text editor, then modify to your preferred details.\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\nthis.getField(&quot;submit&quot;).hidden = true;\r\n\r\nvar cToAddr = &quot;travis@offtherichterdesign.com&quot;\r\nvar cCCAddr = &quot;service@offtherichterdesign.com&quot;\r\nvar cBody = &quot;Off The Richter Design: Business Training Request\\n&quot; + &quot;\\nThe attached file is the filled-out form. Please open it to review the data.&quot;\r\nvar cSubLine = &quot;Business Training Request&quot;\r\nthis.mailDoc({bUI: true, cTo: cToAddr, cCc: cCCAddr, cSubject: cSubLine + &quot;Off The Richter Design&quot;, cMsg: cBody});<\/pre>\n<\/li>\n<li style=\"text-align: left;\">Save the document and test the functionality.<\/li>\n<\/ol>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>Developer Software Required: Adobe Acrobat A.K.A Adobe Acrobat Pro End User Software Required: Adobe Reader A.K.A. Adobe Acrobat Reader When a fillable .pdf is opened in Adobe Reader and filled in, typically the end user will save the .pdf with the contents entered, then email the document to the designated recipient. However, if you are&#8230;<\/p>\n<p class=\"more-link\"><a href=\"https:\/\/offtherichterdesign.com\/Blog\/acro-javascript-custom-submit-button\/\" class=\"themebutton3\">Read More<\/a><\/p>\n<p><!-- AddThis Advanced Settings generic via filter on get_the_excerpt --><!-- AddThis Share Buttons generic via filter on get_the_excerpt --><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,105],"tags":[14,12,11,15,10,13,18],"class_list":["post-85","post","type-post","status-publish","format-standard","hentry","category-coding-with-coffee","category-acro-javascript","tag-acro-javascript","tag-acrobat","tag-adobe","tag-fillable-forms","tag-javascript","tag-reader","tag-submit-form"],"_links":{"self":[{"href":"https:\/\/offtherichterdesign.com\/Blog\/wp-json\/wp\/v2\/posts\/85","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/offtherichterdesign.com\/Blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/offtherichterdesign.com\/Blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/offtherichterdesign.com\/Blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/offtherichterdesign.com\/Blog\/wp-json\/wp\/v2\/comments?post=85"}],"version-history":[{"count":1,"href":"https:\/\/offtherichterdesign.com\/Blog\/wp-json\/wp\/v2\/posts\/85\/revisions"}],"predecessor-version":[{"id":565,"href":"https:\/\/offtherichterdesign.com\/Blog\/wp-json\/wp\/v2\/posts\/85\/revisions\/565"}],"wp:attachment":[{"href":"https:\/\/offtherichterdesign.com\/Blog\/wp-json\/wp\/v2\/media?parent=85"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/offtherichterdesign.com\/Blog\/wp-json\/wp\/v2\/categories?post=85"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/offtherichterdesign.com\/Blog\/wp-json\/wp\/v2\/tags?post=85"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}