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

**Published:** February 17, 2021
**Author:** Editorial Team

**Excerpt:** The wpforms_smart_tags filter is used to create, filter and use through all Smart Tags inside the WPForms plugin with PHP.

**Content:**

## Description

The `wpforms_smart_tags` filter is used to create, define and register a Smart Tag to be used inside the WPForms form builder.

## Parameters

$tags*(array) (Required)* Key, Name and registration of Smart Tag.## Source

`wpforms/includes/class-smart-tags.php`

## More Information

The filter is used to create, define and register Smart Tag(s) to be used inside the WPForms form builder.

Using this filter must also be accompanied by the `wpforms_smart_tag_process` in order to process the Smart Tag.

## Example

```

/**
 * Create a WPForms Smart Tag.
 * Register the Smart Tags so it will be available to select in the form builder.
 *
 * @link    https://wpforms.com/developers/wpforms_smart_tags/
 * 
 * @param   array  $tags  Key, Name and registration of Smart Tag.
 * @return  array
 */

function wpf_dev_register_smarttag( $tags ) {
 
    // Key is the tag, item is the tag name.
    $tags[ 'key' ] = 'Smart Tag Name';
     
    return $tags;
}
add_filter( 'wpforms_smart_tags', 'wpf_dev_register_smarttag', 10, 1 );
```

## Reference Articles

- [How to Create a Custom Smart Tag](https://wpforms.com/developers/how-to-create-a-custom-smart-tag/ "How to Create a Custom Smart Tag")
- [How to Create a Smart Tag for the Current Time](https://wpforms.com/developers/how-to-create-a-smart-tag-for-the-current-time/ "How to Create a Smart Tag for the Current Time")
- [How to Create a Unique ID for Each Form Entry](https://wpforms.com/developers/how-to-create-a-unique-id-for-each-form-entry/ "How to Create a Unique ID for Each Form Entry")
- [How to Create More User Smart Tags](https://wpforms.com/developers/how-to-create-more-user-smart-tags/ "How to Create More User Smart Tags")
- [How to Include Post Submissions Post URL in the Confirmation Message](https://wpforms.com/developers/how-to-include-post-submissions-post-url-in-the-confirmation-message/ "How to Include Post Submissions Post URL in the Confirmation Message")
- [How to Create a Smart Tag from an ACF Field](https://wpforms.com/developers/how-to-create-a-smart-tag-from-an-acf-field/ "How to Create a Smart Tag from an ACF Field")
- [How to Create a Smart Tag Domain URL](https://wpforms.com/developers/how-to-create-a-smart-tag-domain-url/ "How to Create a Smart Tag Domain URL")

**Categories:** Filters Hooks

**Tags:** PHP

---

