Embedded Form

Documentation Home

What is an Embedded Form?

An embedded form is a way to take a FormSite form and embed it into a page on your website. Users will see the form inside your page instead of in its own browser window. This is useful when you don't want users to leave your page.

Embed Code Options

On the Publish page, go to the "Embed Code" section. Copy the embed code and paste it into the area on your page where you want the form to appear.

Your embed code will look similar to the example below.

<a name="formvtjqi9JE" id="formAnchorvtjqi9JE"></a>
<script type="text/javascript" src="http://www.formsite.com/include/form/embedManager.js?vtjqi9JE"></script>
<script type="text/javascript">
EmbedManager.embed({
     key: "www.formsite.com/app/FormSite?EParam=IRLY%2BVpkPzwe1pSPoPJMOjxIEKm8&vtjqi9JE",
     prePopulate: { "2":"Alex", "3":"Powers","4-1":"1","4-2":"2"},
     resizeCallback: yourFunction,
     showFormLogin: false,
     width: "100%"
});
</script>

The following options are available:

  • key (required): Tells FormSite where to find your form. Do not change this.
  • prePopulate (optional): Prepopulates fields on the first page of your form. Use number/value pairs to specify which field should get which value. Each number should correspond to the position of a field on your form. For pre-populating Matrix/Grid Items, use the "Item-SubQuestion" format.
  • resizeCallback (optional): A JavaScript function to call each time the height of the form changes. Use this if your form is inside a dialog or an area that needs to update itself each time the form resizes.
  • showFormLogin (optional): For Save & Return forms, true to show the login page as the first page, false to show the first page of the form.
  • width (required): A number or percentage to use for the form's width.

Troubleshooting

If the embedded form does not load, start by verifying the embed code has been copy/pasted correctly. If you are using an editor to edit your site, check if you need to paste the code in "HTML" or "source" mode to prevent the editor from handling the code as normal text.

It is possible for existing HTML and scripts on your page to interfere with the embedded form. Verify that all HTML on your page is valid and that there are no script errors.

Documentation Home