Created
August 15, 2012 23:13
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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