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.

How to display submitted data

  1. nes49
    Member

    Okay, I'm missing something simple here.

    I'm using Gravity Forms for registration, and I'd like modify a WordPress page to display a list of the people attending along with a few bits of other info pulled from their form entries.

    If I understand the discussion in this post
    http://www.gravityhelp.com/forums/topic/three-things-i-was-surprised-to-find-missing

    it appears that an additional plugin is needed to do this. [Though your Docs describe an Entry object, I can't find any examples of instantiating that except by a form submission.]

    +1 to adding this to the base system.

    Why do this? Well, if the data can only be accessed after a CSV download, you've now got more than one copy of the data. When the data needs to be shared (say different people may have to update fields from the original form data) it seems we're being pushed into copying the data to something like a Google docs spreadsheet, which then becomes the "one true source". Maybe there are performance reasons for putting the "live" copy somewhere other than in the WordPress database -- but it seems if you're providing such a grand user interface to edit the data, it only makes sense to have an easy way to display it. More experienced programmers than I may not see a problem here, and just roll their own, but ...

    I'll investigate the other plugin.

    Posted 11 years ago on Wednesday March 20, 2013 | Permalink
  2. What information are you trying to display exactly? I've written shortcodes in the past to pull out information from all entries on a form. Maybe you can use something like this?

    http://pastebin.com/FUF9HA6B
    or more likely this:
    http://pastebin.com/kHpaHQvi

    Those examples show how to get entry information from a form by using a shortcode. You can then embed the shortcode wherever you like to show that information on your site.

    Posted 11 years ago on Saturday March 23, 2013 | Permalink
  3. nes49
    Member

    Yes, that is helpful.

    Would it be possible to put documentation on RGFormsModel::get_leads in the Documentation section? Or have I just been unable to find it there?

    It looks as if it takes three parameters -
    form_id
    id of field on which to sort
    direction of the sort.

    and it returns an array of all the entries, and each entry is an array with the field ids as indexes.

    About right?

    Anything else?

    Posted 11 years ago on Monday March 25, 2013 | Permalink
  4. We're renewing the documentation for version 1.7 which is currently in beta release. The best source of documentation is to take a look at the source.

    This function is in forms_model.php starting on line 2467:

    [php]
    public static function get_leads($form_id, $sort_field_number=0, $sort_direction='DESC', $search='', $offset=0, $page_size=30, $star=null, $read=null, $is_numeric_sort = false, $start_date=null, $end_date=null, $status='active'){

    Those are the parameters and the order in which you use them.

    Posted 11 years ago on Monday March 25, 2013 | Permalink
  5. I am also having similar queries and yesterday I wrote lots of complex joins to get the desired data. I wish there was a better documentation for the api, specially get_leads function.

    Posted 11 years ago on Wednesday March 27, 2013 | Permalink
  6. The best source of up to date documentation is the source of the plugin at this time. The public hooks and filters are documented on this page http://www.gravityhelp.com/documentation/page/Developer_Docs but for the internal functions, you will need to view the source.

    Posted 11 years ago on Sunday March 31, 2013 | Permalink