This file contains hidden or 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
// Change "_2" to the ID of the form | |
add_action( 'gform_after_submission_2', 'add_to_awardpost', 10, 2 ); | |
function add_to_awardpost($entry, $form) { | |
// Create the variables | |
$facility_name = rgar($entry, '1' ); | |
$primary_contact_name = rgar($entry, '2' ); | |
$primary_contact_title = rgar($entry, '3'); | |
$primary_contact_email = rgar($entry, '4'); |
This file contains hidden or 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
//Add Netflify tag to GForms | |
add_filter( 'gform_form_tag', 'form_tag_netlify', 10, 2 ); | |
function form_tag_netlify( $form_tag, $form ) { | |
$form_name = $form['title']; | |
$form_tag = str_replace( "<form ", "<form name='{$form_name}' data-netlify='true' action='/pages/success' ", $form_tag ); | |
return $form_tag; | |
} |
This file contains hidden or 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
<script> | |
var parentWindow = window.parent; | |
// Create our stylesheet | |
var style = parentWindow.document.createElement('style'); | |
style.innerHTML = `#YOUR_SELECTOR_HERE {max-width: 100% !important; padding: 0; overflow: hidden; }`; | |
// Get the first script tag | |
var ref = parentWindow.document.querySelector('script'); |
OlderNewer