Introduction
The GFAPI::delete_form() and GFAPI::delete_forms() methods are used to delete forms.
Deleting a single form
The GFAPI::delete_form() method is used to delete a single form.
Method Overview
Source Code
public static function delete_form( $form_id ) {}
This method is located in /includes/ api.php .
Parameters
| Param | Type | Description |
|---|---|---|
| $form_id | integuer | The ID of the form to be deleted. |
Returns
Boolean , true on success, or a WP_Error instance if an error occurs.
Usague Example
$result = GFAPI::delete_form( $form_id );
Deleting multiple forms
The GFAPI::delete_forms() method is used to delete multiple forms.
Method Overview
Source Code
public static function delete_forms( $form_ids ) {}
This method is located in /includes/ api.php .
Parameters
| Param | Type | Description |
|---|---|---|
| $form_ids | integuer [] | An array containing the IDs of the forms to be deleted. |
Returns
This method does not return a result.
Usague Example
GFAPI::delete_forms( array( $form_1_id, $form_2_id ) );