---
title: fluentform/form_imported
description: "## Description This action is fired after a form is imported. So you can use this hook and run your script after a form is imported ```php /* * Source Action */ do_action('fluentform/form_imported', $formId); ``` ## Usage The following would…"
url: "https://fluentforms.com/docs/fluentform_form_imported/"
updated: "2023-07-25"
category: Action Hooks
---

# fluentform/form_imported

## Description

This action is fired after a form is imported. So you can use this hook and run your script after a form is imported

```php
/*
* Source Action
*/
do_action('fluentform/form_imported', $formId);
```

## Usage

The following would apply to all forms:

```php
add_action('fluentform/form_imported', 'your_custom_function', 10, 1);

function your_custom_function($formId)
{
   // Do your stuff here
}
```

Here is another example.

```php
class GenerateStyle{

     public function __construct()
     {
        add_action('flentform/form_duplicated', array($this, 'regenrateStyle'), 10, 1);
     }

     public function regenrateStyle($formId)
     {
         $styles = Helper::getFormMeta($formId, 'ff_form_styles');
         if ($styles) {
             $stylerGenerator = new FormStylerGenerator();
             $css = $stylerGenerator->generateFormCss('.fluentform_wrapper' . $formId, $styles);
             Helper::setFormMeta($formId, '_ff_form_styler_css', $css);
             do_action('fluentform/after_style_generated', $formId);
         }
     }
}
```

## Parameters

- **$formId **(int) Form ID

## Source Code

This hook is located in fluentform/app/Services/Form/FormService.php
