Skip to content

Instantly share code, notes, and snippets.

@jentanbernardus
Created January 7, 2013 00:31
Show Gist options
  • Save jentanbernardus/4471335 to your computer and use it in GitHub Desktop.
Save jentanbernardus/4471335 to your computer and use it in GitHub Desktop.
Here is my workaround which you can use to show your Gravity Form outside of wordpress using an iframe: 1) Create a page template and paste in the code from Snippet 1. Do not add any header or footer, you only want to display the form itself. 2) Create a wordpress page with the name/slug = gform2 - If you want a different slug than the template …
<!-- Snippet 1 - This is for the page template page-gform2.php -->
<style type="text/css">
#gform_wrapper_2{font-family:"Trebuchet MS", Arial, Helvetica, sans-serif}
</style>
<?php gravity_form(2,false,false) ?>
<!-- Snippet 2 - This is the iframe html to display the form -->
<iframe src="http://mydomain.com/gform2/" width="249" height="160"></iframe>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment