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.

RGFormsModel::get_lead_count()

  1. I'm trying to figure out a way to count the number of times a logged in user has submitted a form.

    Searching the forum I came across WPSpecialits post and Marsius's post regarding:
    the get_lead_count function.

    I just can't get it to work.

    Here's what I've tried:

    if (is_user_logged_in()){
      $user_info = get_userdata( $current_user->ID); //this bit works and pulls the user id.
    $entry_count = RGFormsModel :: get_lead_count( $form_id, $user_info->user_login); //This bit doesn't work - if i echo $entry_count i get nothing!!
    Posted 12 years ago on Saturday January 14, 2012 | Permalink
  2. Correction to the above. If I enter the form id (e.g. "1") the function returns 0 (zero) even though there are submissions for the logged in user.

    Posted 12 years ago on Monday January 16, 2012 | Permalink