• Resolved chrisong81

    (@chrisong81)


    Hi All,

    Anyone know how to write the coding to check total entries for the form id on wordpress?

    Thanks.

Viewing 1 replies (of 1 total)
  • Plugin Support Reedwanul Haque

    (@reedwanul)

    Hi @chrisong81,

    Thanks for reaching out to us & extremely sorry for the delayed response.

    Below, I’m sharing some codes to retrieve the entry count based on the form ID. Check this video – https://d.pr/v/TqrFCB on how to implement those codes.

    global $wpdb;
    
    $entry_count = $wpdb->get_results($wpdb->prepare(" SELECT COUNT( post_id )  as count  FROM " . $wpdb->prefix . "postmeta WHERE meta_key LIKE %s AND meta_value = %d ",'metform_entries__form_id',FORM_ID), OBJECT);
    
    $entry_count = $entry_count[0]->count;
    
    $entry_count = $entry_count;
    
    print_r($entry_count);

    Important notice: We typically don’t offer custom code support to our users. Should you encounter difficulties implementing this code for different purposes, we cannot take responsibility. Your understanding and cooperation in this matter are highly appreciated.

    Best Regards,
    Reju

Viewing 1 replies (of 1 total)
  • The topic ‘MetForm Check How Many Entries PHP Coding’ is closed to new replies.