---
title: fluentform/html_attributes
description: "## Description  This filter is available just before rendering the form. You can use this filter to modify the form attributes. ```php apply_filters('fluentform/html_attributes',$attr, $form); ``` ## Usage   The following would apply to all forms: ```php add_filter('fluentform/html_attributes', function($attr, $form){ return $attr;…"
url: "https://fluentforms.com/docs/fluent_form_html_attributes/"
updated: "2023-07-21"
category: Filter Hooks
---

# fluentform/html_attributes

## Description 

This filter is available just before rendering the form. You can use this filter to modify the form attributes.

```php
apply_filters('fluentform/html_attributes',$attr, $form);
```

## Usage  

The following would apply to all forms:

```php
add_filter('fluentform/html_attributes', function($attr, $form){
   return $attr;
}, 10, 2);
```

## Parameters

- **$form** (object) The [$form Object](https://fluentforms.com/docs/form-object/)
- **$attr** (array) Form Attributes

## Placement

This code should be placed in the [functions.php](http://codex.wordpress.org/Theme_Development#Functions_File) file of your active theme.

## Source Code

This filter is located in FluentForm\App\Services\FormBuilder\FormBuilder -> build($form, $extraCssClass = '', $instanceCssClass = '', $atts = [])
