### [wpforms_conversational_forms_content_before](https://wpforms.com/developers/wpforms_conversational_forms_content_before/)

**Published:** May 17, 2022
**Author:** David Ozokoye

**Excerpt:** The wpforms_conversational_forms_content_before action fires before a form is displayed on the site’s frontend, only if the form exists, contains fields, and was created with the <strong>Conversational Forms</strong> addon.


**Content:**

## Description

The `wpforms_conversational_forms_content_before` action fires before a form is displayed on the site’s frontend, and the form was created with the Conversational Forms addon.

## Parameters

This action does not accept any parameters.

## More Information

The action only fires for forms created with the [Conversational Forms addon](https://wpforms.com/docs/how-to-install-and-use-the-conversational-forms-addon/ "Conversational Forms Addon"). It executes early on in the output rendering process.

An alternate action to consider is `wpforms_conversational_forms_content_after`, as it functions similarly but will display after the form.

## Source

`wpforms-conversational-forms/templates/single-form.php`

## Examples

In this example, we’re going to display a video message prior to displaying the form.

```

/**
 * Output something before your Conversational Forms
 * 
 * @link  https://wpforms.com/developers/wpforms_conversational_forms_content_before/
 */
 
function wpf_dev_conversational_forms_content_before( ) {
       
    // Run code or see example echo statement below.
    _e( '', 'plugin-domain' );
   
}
add_action( 'wpforms_conversational_forms_content_before', 'wpf_dev_conversational_forms_content_before');
```

![you can output anything before a conversational form using the wpforms_conversational_forms_content_before action](https://wpforms.com/wp-content/uploads/2022/05/wpforms-cf-output-before.jpg)If you’re using this exact snippet, you may even want to add some CSS to your site. As an example, we’ve provided a CSS snippet as well.

```

.video-announcement iframe {
    height: 460px;
    width: 100%;
}

.video-announcement {
    text-align: center;
    margin-top: 10px;
}
```

**Categories:** Actions Hooks

**Tags:** Conversational Forms, PHP

---

