ninja_forms_edit_field_remove_button

The Ninja Forms ninja forms edit field remove button function.

Description

ninja_forms_edit_field_remove_button( $field_id ); 

Parameters (1)

0. $field_id
The field id.

Usage

  1. if ( !function_exists( 'ninja_forms_edit_field_remove_button' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'ninja-forms/deprecated/includes/admin/edit-field/remove-button.php'; 
  3.  
  4. // The field id. 
  5. $field_id = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = ninja_forms_edit_field_remove_button($field_id); 
  9.  

Defined (1)

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

/deprecated/includes/admin/edit-field/remove-button.php  
  1. function ninja_forms_edit_field_remove_button( $field_id ) { 
  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. $show_remove = $reg_field['show_remove']; 
  8.  
  9. if ( $show_remove ) { 
  10. ?> 
  11. <div class="menu-item-actions description-wide submitbox"> 
  12. <a class="submitdelete deletion nf-remove-field" id="ninja_forms_field_<?php echo $field_id;?>_remove" data-field="<?php echo $field_id; ?>" href="#"><?php _e('Remove', 'ninja-forms'); ?></a> 
  13. </div> 
  14. <?php 
  15.