| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
An extension for the Gravity Forms WordPress plugin.
This extension provides an admin interface that allows the user to create 'feeds' that will asynchronously submit data from a gravity form submission to a 3rd party URL.
It is designed to 'mock' form submissions by POST-ing the data as a url encoded form request. The admin interface also provides a section where key/value data can be provided to send along with the request - this is to mock the inclusion of data in hidden fields, which is pretty common for services such as salesforce. There is the added benefit of these values never being exposed to the front-end user as well.
A single gravity forms submission can post to multiple external services by having multiple feeds, each of which can have it's own settings, selection of values to send etc
Manual WordPress plugin install
Note: You will not recieve any updates as they are released when installing via this method
WordPress install via Github Updater
After activation there will be a new item in the settings menu called 'Form Integrator'
Create a feed and you will be presented with the main settings page
Conditionals
Dynamic Fields
Extra Data
The plugin will exhibit some extra behaviour is a constant names WP_ENV is defined
In order to utilise the Async feed processing features you must define a WP_ENV constant, and the value must be either live or production
A single form can have multiple feeds to submit to multiple external services, or multiple conditional feeds etc
Feeds can be disabled while keeping their settings intact - useful if they're not ready for primetime or the feed is seasonal
Cloning Feeds across forms
There isn't currently any copy/clone feed action, so if you need to configure a single external service to work across many forms it can get a bit tedious
Each feed's settings are stored in a single row in the %%Your DB Prefix%%_gf_addon_feed table, it's pretty easy to duplicate the rows and just change the form_id value to match a different form.
The feed settings are all JSON, so you can edit them without having to worry about PHP Serialized data woes
The plugin has 2 main filters - these allow you to manipulate the data before it is submitted to the external service
Example use case: converting Gravity Forms checkbox or multi-select fields into a format salesforce will understand
<?php
add_filter('gf_form_integrator_modify_dynamic_field_value', 'myFormIntegratorFilter', 10, 7);
// This filter is applied to each dynamic field map pairing before it's added to the array
function myFormIntegratorFilter( $fieldValue, $fieldName, $fieldObject, $formIntegratorObject, $gf_feedArray, $gf_entryArray, $gf_formArray ){
// Do Stuff here
return $fieldValue;
};
// Even though filters technically shouldn't cause side effects, you can add additional items to the array via
// $formIntegratorObject->_postDataValues['my_extra_key'] = 'my_extra_value'
// return false to prevent this value from being added to the 'postDataValues' arrayThere is also a filter called just before all the values are sent, containing the array of all data to be sent in the POST request
<?php
add_filter('gf_form_integrator_modify_values_pre_submit', 'myFormIntegratorArrayFilter', 10, 4);
// This filter is applied once right before the POST request is made
function myFormIntegratorFilter( $arrayOfData, $gf_feedArray, $gf_entryArray, $gf_formArray ){
// Do Stuff here
return $arrayOfData;
};
// return false to prevent the submission of ALL VALUES to the service (cancel the whole thing)
// use with caution, implement logging in your filter if you are going to short circuit things (add a note or something)Do your validation using Gravity Forms - the feed only gets processed for valid submissions
If you are submitting to Pardot, be aware that you need to configure a SEPERATE feed for Salesforce web2lead.
Pardot passes these values on after submission using some heaps hacky JS, as we're making this request programatically there's no browser to run this JS!
| Back | FazBrowse Home | New Git URL |