nf_field_autocomplete_off

The Ninja Forms nf field autocomplete off function.

Description

nf_field_autocomplete_off( $field_id, $field_data ); 

Parameters (2)

0. $field_id
The field id.
1. $field_data
The field data.

Usage

  1. if ( !function_exists( 'nf_field_autocomplete_off' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'ninja-forms/deprecated/includes/admin/edit-field/autocomplete-off.php'; 
  3.  
  4. // The field id. 
  5. $field_id = null; 
  6.  
  7. // The field data. 
  8. $field_data = null; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = nf_field_autocomplete_off($field_id, $field_data); 
  12.  

Defined (1)

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

/deprecated/includes/admin/edit-field/autocomplete-off.php  
  1. function nf_field_autocomplete_off( $field_id, $field_data ) { 
  2. global $ninja_forms_fields; 
  3.  
  4. $field_row = ninja_forms_get_field_by_id( $field_id ); 
  5. $field_type = $field_row['type']; 
  6. $reg_field = $ninja_forms_fields[$field_type]; 
  7. $edit_autocomplete_off = $reg_field['edit_autocomplete_off']; 
  8. if( $edit_autocomplete_off ) { 
  9. $autocomplete_off = isset ( $field_data['autocomplete_off'] ) ? $field_data['autocomplete_off'] : 0; 
  10. ninja_forms_edit_field_el_output($field_id, 'checkbox', __( 'Disable Browser Autocomplete', 'ninja-forms' ), 'autocomplete_off', $autocomplete_off, 'wide' );