PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Gravity form to XML file

  1. Is it possible to collect information using a Gravity form and have it create an XML file? Or using the Gravity form to collect the information and have some other automatic method of creating the XML file?

    Posted 12 years ago on Tuesday June 28, 2011 | Permalink
  2. What is this XML file for? Is it an XML file of the entry data? Anything is possible via customizations, so if you provide more details on what you would like to accomplish i'd be glad to provide you with some guidance.

    Posted 12 years ago on Tuesday June 28, 2011 | Permalink
  3. I'd like to have a Gravity form to collect information that will produce an XML video sitemap. The sitemap would be submitted to Google via the Google Webmaster Tools.

    The form would collect this information:

    http://www.google.com/support/webmasters/bin/answer.py?answer=80472#1

    Posted 12 years ago on Tuesday June 28, 2011 | Permalink
  4. In this case it could only be done with custom code. Gravity Forms has a wide array of API hooks and filters that can be used to customize how it works and what it does. If you need to generate an XML file using form submission data you could use the gform_post_submission hook which has access to the entry objet containing all the form data that was submitted and write custom PHP to generate the XML file.

    Documentation for the gform_post_submission hook can be found here:

    http://www.gravityhelp.com/documentation/page/Gform_post_submission

    Documentation for the entry object can be found here:

    http://www.gravityhelp.com/documentation/page/Entry_Object

    If you need to hire a developer to implement this customization for you I can refer you to developers with Gravity Forms customization experience.

    Posted 12 years ago on Tuesday June 28, 2011 | Permalink
  5. EasyCo
    Member

    Hello,
    I would like to do the same thing as the previous poster, but with different XML. I've already implemented the gform_post_submission hook to do the XML parsing. What I can't find is a way to add the new XML file to the entry object so it will be stored in the database. This is the documentation that I see for the entry object: http://www.gravityhelp.com/documentation/page/Entry_Object. Thanks for any help you can provide.

    Posted 12 years ago on Wednesday July 13, 2011 | Permalink
  6. The user above just wanted to generate an XML file when the form is submitted. I'm not sure what you mean you want to store the XML file to the entry object? You couldn't store the XML file itself in the entry object.

    You would create and store the file on your server and if you wanted a link to that file to appear in the Entry Details what you could do is add a hidden field to your form and then using the gform_post_submission hook store the http:// URL to the XML file you generate as the value of that field using the Entry object.

    Posted 12 years ago on Wednesday July 13, 2011 | Permalink