problem with limit submissions per time period
-
Hi Team,
I am using the following filter to limit the submissions forms per user’s email per month, but unfortunately, each user can submissions several forms with one email.
yours document:
https://formidableforms.com/knowledgebase/frm_validate_entry/#kb-limit-submissions-per-time-period-or-any-stat
Is this filter still valid?
My code is:
Field 182 is the email field of my usersadd_filter('frm_validate_entry', 'check_submitted', 20, 2); function check_submitted($errors, $values){ if ( $values['form_id'] !== 6 ) {//Change 30 to the ID of your form return $errors; } $entries_submitted = FrmProStatisticsController::stats_shortcode( array( 'id' => 182, 'type' => 'count', 'user_id' => 'current', 'created_at_greater_than' => 'this month' ) );//change the params to the params of your stat if ( $entries_submitted >= 1 ){//change 1 to your limit number $errors['too_many'] = 'You filled this form this month, please register the feedback in the next month.';//Change this to your error message } return $errors; }
BR
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘problem with limit submissions per time period’ is closed to new replies.