Link

How to access the FormVuAPI JavaScript API

What is the FormVuAPI?

The FormVuAPI can be used for:

It is provided in JavaScript, is available from the DOM window object, and can be accessed as you would expect for most JavaScript calls.

Console (Development/Testing Only)

The easiest way to access the JavaScript for a converted file would be with your browsers JavaScript Console). Note: any changes made will be lost on refresh of the page.

All you need to do is open “Developer Tools”, select the “Console” tab, type in the JavaScript, and press enter to execute it.

Edit form.html

You can edit the form.html file directly. The simplest use-case would be to edit the onclick attribute of the Submit Form Button (found in the <div id="FDFXFA_Menu"> element).

For example:

<a title="Submit Form" onclick="FormVuAPI.submitFormAsFormData('INSERT-URL-HERE')">

<script> tags

Adding in a JavaScript <script> tag is also a method that would allow for you to access the FormVuAPI. Using the defer attribute is advised to ensure that the form has fully loaded before running your custom code.

For example:

<script defer>
  FormVuAPI.submitFormAsFormData('INSERT-URL-HERE');
</script>

iframe

To access the content when the FormVu output is in an iframe, you can either:

  1. Select the element and access it via the contentWindow attribute, e.g.
    document.getElementById('iframe-id-here').contentWindow.FormVuAPI.submitFormAsFormData('INSERT-URL-HERE');
    
  2. Access it via window.frames. For example, if it’s the only iframe on the page, you could use:
    window.frames[0].FormVuAPI.submitFormAsFormData('INSERT-URL-HERE');
    

What's included in your FormVu trial?

  • Access to download the SDK and run it locally.
  • Access to the cloud trial to convert documents in the IDR cloud.
  • Access to the Docker image to set up your own trial server in the cloud.
  • Communicate with IDR developers to ask questions & get expert advice.
  • Plenty of time to experiment and build a proof of concept.
  • Over 100 articles to help you get started and learn about FormVu.
  • An exceptional PDF Form to HTML converter that took over 20 years to build!

Start Your Free Trial