Search
 
SCRIPT & CODE EXAMPLE
 

PHP

formidableforms limit only 2 submissions per user

add_action('frm_display_form_action', 'check_entry_count', 8, 3);
function check_entry_count($params, $fields, $form){
  global $user_ID;
  remove_filter('frm_continue_to_new', '__return_false', 50);
  if($form->id == 5 and !is_admin()){ //replace 5 with the ID of your form
    $count = FrmEntry::getRecordCount("form_id=". $form->id ." AND user_id=".$user_ID); 
    if($count >= 2){ //change 2 to your entry limit
      echo 'This form is closed';
      add_filter('frm_continue_to_new', '__return_false', 50);
    }
  }
}
Comment

PREVIOUS NEXT
Code Example
Php :: why php is not using datatype 
Php :: Eloquent orWhere clousure 
Php :: redirecionar tienda agregar carrito woocommerce 
Php :: PHP Warning: Module "curl" is already loaded in Unknown on line 0 
Php :: how to convert amount in words in php 
Php :: json data wdit in php 
Php :: php pass byref 
Php :: Laravel Http client throw exception if request is not successful 
Php :: Code début Selenium PHP 
Php :: laravel defining relationship 
Php :: digitalocean php as text 
Php :: disable cors laravel 
Php :: echo two variables same line php 
Php :: how to include page specific css in xphp smart header 
Php :: install php 7.4 amazon linux 2 
Php :: rename matomo php 
Php :: exe:/usr/local/bin/php 
Php :: php code to display a div with background fade 
Php :: phpdoc array of strings 
Php :: razorpay refund laravel 
Php :: exists:categories,id except a value laravel 
Php :: require_once in class php 
Php :: custom-taxonomy-image-option-in-admin-panel 
Php :: how to fetch google reviews and data in php URl 
Php :: without login cant purchase woocommerce 
Php :: magento2 migration 
Php :: laravel 8 api validation 
Php :: php join array to parenthesis 
Php :: HP officejet pro 8720 default password 
Php :: PHP readfile() Function 
ADD CONTENT
Topic
Content
Source link
Name
3+1 =