Skip to content

Instantly share code, notes, and snippets.

@Ssiskind
Created August 15, 2012 23:13
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Ssiskind/3364572 to your computer and use it in GitHub Desktop.
Save Ssiskind/3364572 to your computer and use it in GitHub Desktop.
Use this sample code to generate a dummy form in your HubSpot landing page template
<div class="form-wrapper">
<div class="form-wrapper-inner">
<div id="hubspot_form_widget_wrapper">
{% form "main_form" editing={group="page_actions", order=30} %}
</div>
<div id="hubspot_dummy_form" style="display: none">
<form class="hs-form stacked">
<h3 class="form-title">Fill Out Our Form</h3>
<div class="field">
<label>First Name</label>
<div class="input">
<input class="hs-input" type="text" />
</div>
</div>
<div class="field">
<label>Last Name</label>
<div class="input">
<input class="hs-input" type="text" />
</div>
</div>
<div class="field">
<label>Company</label>
<div class="input">
<input class="hs-input" type="text" />
</div>
</div>
<div class="field">
<label>Email</label>
<div class="input">
<input class="hs-input" type="text" />
</div>
</div>
<a class="hs-button large primary" href="#">Get Free Widget</a>
</form>
</div>
<script type="text/javascript">
if ($.trim($('#hubspot_form_widget_wrapper').text()).toLowerCase() === "no form selected") {
$('#hubspot_form_widget_wrapper').hide();
$('#hubspot_dummy_form').show();
}
</script>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment