Heads up!
This article contains PHP code and is intended for developers. We offer this code as a courtesy, but don't provide support for code customizations or 3rd party development.
This article contains PHP code and is intended for developers. We offer this code as a courtesy, but don't provide support for code customizations or 3rd party development.
This hook is triggered immediately after importing an XML form, allowing you to make any changes to the form that was just imported, if needed, or perform other actions.
Usage
add_action('frm_after_import_form', 'function_name', 10, 2);
Parameters
- $new_form_id (int)
- $old_form (array)
Examples
Send an email notification after a form is imported
add_action( 'frm_after_import_form', 'send_mail_after_import_form', 10, 2 );
function send_mail_after_import_form( $form_id, $form ) {
wp_mail( get_bloginfo('admin_email'), 'Form imported', 'Form ' . $form->name . ' has been imported' );
}