Skip to main content
rsn023
New Participant
May 5, 2014
Question

Add redirect to Submit button on PDF Form

  • May 5, 2014
  • 1 reply
  • 768 views

I need someone that knows javascript to help me out! 

I have saved the FormsCentral PDF Form locally and opened it up with Acrobat Pro XI, saved it as a copy, and then opened the new document in Acrobat Pro XI.  I am able to see the javascript that the FormsCentral Submit button placed in the form.

How can I get the submit button to do what it is supposed to do (below), but then when its completed it should redirect to a different web page that I specify in the javascript code - in the SAME window, not in a new window.

The submit button javascript code looks like this:

var url = 'https://adobeformscentral.com/pdfsubmit?f=bbbbbbbbbbbb';

var qParams = '&os=' + app.platform + '&sl=' + app.language + '&spv=1';

var fIndex = url.indexOf('#FDF');

url = url.substr(0, fIndex) + qParams + url.substr(fIndex);

var charset = 'utf-8';

if (app.language == 'JPN')

charset = 'Shift-JIS';

this.submitForm({cURL:url, cSubmitAs:'HTML', cCharset:charset});

Do I need to add a location.href = "http://mydomain.com/completedpdf"; to make the current window then load the completedpdf web page?  And how do I add the command to the end of this javascript?

Or is there some other javascript I should use?

Thank you for your help!

R

This topic has been closed for replies.

1 reply

jcanepa
Adobe Employee
Adobe Employee
May 6, 2014

This is a question that is better suited for the Acrobat forums.