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.
Source Code
public static function delete_form( $form_id ) {} |
This method is located in /includes/api.php.
Parameters
Param | Type | Description |
---|---|---|
$form_id | integer | The ID of the form to be deleted. |
Returns
Boolean, true on success, or a WP_Error instance if an error occurs.
Usage Example
$result = GFAPI::delete_form( $form_id ); |
Deleting multiple forms
The GFAPI::delete_forms()
method is used to delete multiple forms.
Source Code
public static function delete_forms( $form_ids ) {} |
This method is located in /includes/api.php.
Parameters
Returns
This method does not return a result.
Usage Example
GFAPI::delete_forms( array ( $form_1_id , $form_2_id ) ); |