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
if ( !function_exists( 'ninja_forms_edit_field_remove_button' ) ) { require_once ABSPATH . PLUGINDIR . 'ninja-forms/deprecated/includes/admin/edit-field/remove-button.php'; } // The field id. $field_id = null; // NOTICE! Understand what this does before running. $result = ninja_forms_edit_field_remove_button($field_id);
Defined (1)
The function is defined in the following location(s).
- /deprecated/includes/admin/edit-field/remove-button.php
- function ninja_forms_edit_field_remove_button( $field_id ) {
- global $ninja_forms_fields;
- $field_row = ninja_forms_get_field_by_id($field_id);
- $field_type = $field_row['type'];
- $reg_field = $ninja_forms_fields[$field_type];
- $show_remove = $reg_field['show_remove'];
- if ( $show_remove ) {
- ?>
- <div class="menu-item-actions description-wide submitbox">
- <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>
- </div>
- <?php
- }
- }