ninja_forms_form_settings_restrictions

The Ninja Forms ninja forms form settings restrictions hook.

Description

apply_filters( 'ninja_forms_form_settings_restrictions', (callback) $var ); 

Parameters (1)

0. $var — Optional. (callback) => array( 'page' => 'ninja-forms', 'tab' => 'form_settings', 'slug' => 'restrictions', 'title' => __( 'Restrictions', 'ninja-forms' ), 'state' => 'closed', 'settings' => array( array( 'name' => 'logged_in', 'type' => 'checkbox', 'desc' => '', 'label' => __( 'Require user to be logged in to view form?', 'ninja-forms' ), 'display_function' => '', 'help' => '', ), array( 'name' => 'not_logged_in_msg', 'type' => 'rte', 'label' => __( 'Not Logged-In Message', 'ninja-forms' ), 'desc' => __( 'Message shown to users if the "logged in" checkbox above is checked and they are not logged-in.', 'ninja-forms' ), 'tr_class' => '', ), array( 'name' => 'sub_limit_number', 'type' => 'number', 'desc' => '', 'label' => __( 'Limit Submissions', 'ninja-forms' ), 'display_function' => '', 'desc' => __( 'Select the number of submissions that this form will accept. Leave empty for no limit.', 'ninja-forms' ), 'default_value' => '', 'tr_class' => '', 'min' => 0, ), array( 'name' => 'sub_limit_msg', 'type' => 'rte', 'label' => __( 'Limit Reached Message', 'ninja-forms' ), 'desc' => __( 'Please enter a message that you want displayed when this form has reached its submission limit and will not accept new submissions.', 'ninja-forms' ), 'tr_class' => '', ), ), )
The array.

Usage

To run the hook, copy the example below.
  1. $var = apply_filters( 'ninja_forms_form_settings_restrictions', $var ); 
  2.  
  3. if ( !empty( $var ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the ninja_forms_form_settings_restrictions callback 
  2. function filter_ninja_forms_form_settings_restrictions( $var ) { 
  3. // make filter magic happen here... 
  4. return $var
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'ninja_forms_form_settings_restrictions', 'filter_ninja_forms_form_settings_restrictions', 10, 1 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'ninja_forms_form_settings_restrictions', 'filter_ninja_forms_form_settings_restrictions', 10, 1 ); 

Defined (1)

The filter is defined in the following location(s).

/deprecated/includes/admin/pages/ninja-forms/tabs/form-settings/form-settings.php  
  1. $args = apply_filters( 'ninja_forms_form_settings_restrictions', array(