Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Embed a Formstack form asynchronously, using Postscribe
<!-- Main form wrapper, required for styling the form -->
<div class="webform">
<!-- Empty div (must have a unique ID), into which the form will be loaded -->
<div id="formstack-bridal-appointment"></div>
<script type="text/javascript">// <![CDATA[
// Only run the code below when jQuery says the document is ready
(function($) {
// Process the form using postscribe:
// 1. Must reference the unique ID of the div above
// 2. Must contain the embed URL from Formstack
// 3. Must contain the selectBoxes() function in the `done` callback to style any select lists in the form
postscribe('#formstack-bridal-appointment', '<script src=//><\/script>', {
done: function() {
// Style select lists
$('.webform select').selectBoxes();
// ]]></script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.