WP Manifestindependent plugin directory
manifest / forms / gf-entry-xml-export

Gravity Forms Entry XML Export WP Registry grade A. No security issues foundWP RegistryNo security issues foundOpen the reportA

Writes out Gravity Forms entries as XML files

★ 4stars
1.0.3latest · 9 years ago

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/wenderhost/gf-entry-xml-export/archive/refs/heads/master.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

Writes out Gravity Forms submissions as XML files.

Description

This plugin saves out all your Gravity Forms entries as XML files.

Should you want to rename the XML tags generated by your form, you can use the filter gf_to_xml_array_keys which supplies a form submission mapped to an array along with the form ID. Example:

function new_keys( $new_keys, $form_id )
{
    switch( $form_id )
    {
        default:
            $new_keys['First'] = 'first_name';
            $new_keys['Last'] = 'last_name';
        break;
    }

    return $new_keys;
}
add_filter( 'gf_to_xml_array_keys', 'new_keys', 10, 2 );

Specifying where export files get saved

By default, entry XML files get saved in wp-content/uploads/xml/. You can also configure your forms to save XML files in a sub-directory inside wp-content/uploads/xml/. This can be achieved via either a user's selection for a drop down/radio field, or via a hidden field.

Save the export in a user selected sub-directory:

To save a form's export in a sub-directory based on a user's selection, do the following:

  1. Create a user selectable field, and add options to the field with values that will be used for your sub-directory names.
  2. Under the "Appearance" tab for the field, add a Custom CSS Class called createdirectory.

Now, when a user submits the form, his/her submission XML will be exported into a sub-directory of wp-content/uploads/xml/. That sub-directory will be named after the submitted value for the field with the createdirectory.

Save the export via a hidden field specified sub-directory:

To save a form's export in a sub-directory defined by a hidden field value, do this:

  1. Create a hidden field.
  2. Name the field createdirectory.
  3. Set the value of the field to your preferred sub-directory name.

Installation

  1. Upload the plugin to the /wp-content/plugins/ directory
  2. Activate the plugin through the 'Plugins' menu in WordPress

FAQs

How do I start the XML export of my entries?

My code is hooked to gform_after_submission, so the plugin writes out the XML after a form is submitted. So, it doesn’t export existing entries, just new entries when they’re submitted.

Where do entries get exported?

Entry XML files get exported here: wp-content/uploads/xml/. Additionally, you may specify sub-directories where a form's entries are saved. This means you can have a form save entries in different sub-directories based on user-selected form values or by values present in hidden fields. See the section Specifying where export files get saved for more details.

Changelog

1.2.2

  • BUGFIX: Checking for File System API inside write_file().

1.2.1

  • Skipping empty values when building form $data array for writing to XML. This should fix form exports from having empty values for required fields (e.g. empty telephone numbers).

1.2.0

  • Set the export sub-directory via a hidden field with the label of createdirectory and the value will be the name of the sub-directory.

1.1.0

  • Setting a Gravity Forms field's "Admin Field Label" specifies the name of the XML tag used to hold the field's data in the XML export
  • Added special processing for a field's CSS classes. Currently there's only one optional class: createdirectory will use the value of the field to create a directory where the form's XML will be saved.

1.0.4

  • Updating $lead_source variable to be SITE_URL - PAGE_TITLE

1.0.3

  • Adding additional normalization for conversion of GF form field names to valid XML element names
  • BUGFIX: Adding missing semicolon

1.0.2

  • Adding page_title to lead source

1.0.1

  • Adding sitename to XML export filename
  • Changing date value to ISO 8601 date
  • Removing illegal characters from XML tag names

1.0.0

  • Initial release

Releases

4 releases.

Tag
Published
1.0.3 latest
Jul 27, 2017 9 years ago
Jul 26, 2017 9 years ago
Jul 18, 2017 9 years ago
May 5, 2017 9 years ago

These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.

A grade

Security

Gravity Forms Entry XML Export 1.0.3 · audited by WP Registry

No security issues found.

Audited release
1.0.3
Findings
none
Worst severity
—
Content hash
0df0646070a9e66a66e6d805…

WP Registry hashes the installable build and reports on that exact bytes-for-bytes copy. Embargoed findings are withheld until they are disclosed, so a clean verdict means nothing public is outstanding. WP Manifest does not audit code itself.