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.

GFFormsModel::get_leads Not returning all Entries

  1. VFHwebdev
    Member

    I'm running pre-render filter to do some calculations for number of items available for a product with a limited supply. I'm finding that GFFormsModel::get_leads isn't returning all my form entries.

    For example:

    add_action('gform_pre_render_2', 'gform_display_limit');
    function gform_display_limit($form) {
    $entryCount = 0;
    $entries = GFFormsModel::get_leads($form['id']);
    foreach($entries as &$entry){
    $entryCount++;
    }

    $form['description'] .= $entryCount;

    return $form;
    }

    Shows a value of 30 for $entryCount even though I have 52 form entries.

    This is a simplified example. What I actually need to do is loop through all the entries, check the value of a specific field and do some calculations based on that field.

    But if get_leads isn't returning all my form entries, this doesn't really work. Is this expected behavior of get_leads or am I doing something wrong?

    Posted 11 years ago on Tuesday June 18, 2013 | Permalink
  2. Handling via priority support.

    Posted 11 years ago on Thursday June 20, 2013 | Permalink

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