Make sure that you have added the Surface Tag to your site before proceeding.

Edit Head Tag

Add the following code to your webpage’s head tag.

<!-- Start Surface Form Embed -->

<script>
  window.onload = function() {
		const surface_src = "<form url here>"
		const surface_embed_type = "inline"
		const target_element_class = "surface-form-target"
		const c = new SurfaceEmbed(surface_src, surface_embed_type, target_element_class)
  }
</script>

<!-- End of Surface Form Embed -->

Replace the <form url here> with the url to your surface form found by clicking the share button on the surface platform.

Edit Div Tags

Surface needs to know where on the page you’d like to embed the form.

Add the class name surface-form-target to the div tags where you want the forms to be embedded. By default the form will take the entire height and width of the div.

<div class="... surface-form-target"> </div>