NF_AJAX_Requests_DeleteField

The Ninja Forms NF AJAX Requests DeleteField class.

Defined (1)

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

/includes/AJAX/Requests/DeleteField.php  
  1. final class NF_AJAX_Requests_DeleteField extends WP_Async_Request 
  2. protected $action = 'nf_delete_field'; 
  3.  
  4. protected function handle() { 
  5.  
  6. if( ! isset( $_POST[ 'field_id' ] ) ) return; 
  7.  
  8. $field = Ninja_Forms()->form()->get_field( $_POST[ 'field_id' ] ); 
  9. $field->delete();