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.

Programmatically retrieve array of submissions

  1. Is it possible to retrieve array of submissions for certain form programmatically?

    Here's my task:
    - Retrieve array of existing submissions.
    - Prepopulate certain field in form with custom value (say "only 7 left!")
    - Render form on page.

    Any pointers would be appreciated.

    Gleb

    Posted 12 years ago on Saturday February 18, 2012 | Permalink
  2. Hi, Gleb,

    We do not have functions or shortcodes for displaying entry data right now. This would require custom PHP code. You would need to query the database to get the entries for a specific form. You would probably want to do that using the hook "gform_pre_render" (http://www.gravityhelp.com/documentation/page/Gform_pre_render) . The documentation for that also has an example for pre-populating a drop down.

    If you wanted to just display entry data, there is a 3rd party plugin that does this - http://wordpress.org/extend/plugins/gravity-forms-addons/ .

    We are looking into adding the functionality to display entry data of the front end as a feature in the future.

    Let me know if you need more help.

    Posted 12 years ago on Wednesday February 29, 2012 | Permalink
  3. tekoun23
    Member

    Hi Dana,

    I have a similar question to Gleb's. I would like to display entries on a wordpress page as a sort of contact directory.

    When I clicked on the link for the 3rd party plugin you mentioned, it was not found.
    What is the name of the plug in?? Is it still available?
    Do you have any other ideas for how I could do this?

    Thanks so much
    Nadya

    Posted 12 years ago on Saturday March 31, 2012 | Permalink
  4. Hi, tekoun23,

    The name of the plugin is Gravity Forms Directory Add-On, but it doesn't appear to be listed in the add-ons right now. If not using the plugin, you would need to create custom code which queries the database for your form and displays the entries. You could create a form with an html field and use the Gravity Forms "get_leads" function that is in the file forms_model.php to get the leads for a form and have custom code that writes out the information you need.

    Posted 12 years ago on Wednesday April 4, 2012 | Permalink

This topic has been resolved and has been closed to new replies.