Skip to main content
frankz60228614
Participant
July 27, 2017
Question

Dynamic Form Submit URL

  • July 27, 2017
  • 3 replies
  • 919 views

As you can see, there is a submit button trigger action to submit form. how can I change the url when this button is clicked, for example append datetime to the url so the form data will be send to button.ca/reports?datetime=20170727091214 instead of button.ca/reports

This topic has been closed for replies.

3 replies

Participant
August 23, 2018

Does this tool support submit to facebook?

Thank you

Joel Geraci
Community Expert
Community Expert
August 23, 2018

Vietten:

Can you elaborate?

try67
Community Expert
Community Expert
July 27, 2017

Instead of the Submit Form action add a Run JavaScript command to your button's Mouse Up event, with this code:

var targetURL = "http://button.ca/reports?datetime=" + util.printd("yyyymmddHHMMss", new Date());

this.submitForm({cURL: targetURL, cSubmitAs: "PDF"});

Karl Heinz  Kremer
Community Expert
Community Expert
July 27, 2017

You can create a Javascript action that submits your form. Take a look here for information about the Doc.submitForm() method:

Acrobat DC SDK Documentation

By using the JavaScript approach, you can dynamically adjust your submission URL.