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

**Published:** April 26, 2022
**Author:** Editorial Team

**Excerpt:** The wpforms_checkbox_field_display filter will fire on form load to display the field attributes such as label and description.

**Content:**

## Description

The `wpforms_checkbox_field_display` fires on form load to display the field attributes such as label and description.

## Parameters

$field*(array)* Sanitized field data.$field\_atts*(array)* An array of field attributes such as label and description.$form\_data*(array)* Processed form settings/data, prepared to be used later.## Source

`wpforms/includes/fields/class-base.php`

## More Information

This filter is applied to an array of form field attributes. Each form field will have its own unique name, for further information and examples, [please review this snippet tutorial](https://wpforms.com/developers/how-to-process-smart-tags-in-field-labels/ "How to Process Smart Tags in Field Labels").

## Examples

In this example, we’re using this filter to allow for WPForms Smart Tags to be used on every **Checkbox** form field label.

```

/**
 * Using Smart Tags in Checkbox field labels.
 *
 * @link https://wpforms.com/developers/wpforms_checkbox_field_display/
 */
 
function wpf_dev_checkbox_choices_process_smarttags( $field, $deprecated, $form_data ) {

    foreach ( $field[ 'choices' ] as $key => $choice ) {

        if ( ! empty( $choice[ 'label' ] ) ) {

            $field[ 'choices' ][ $key ][ 'label' ] = apply_filters( 'wpforms_process_smart_tags', $choice[ 'label' ], $form_data );

        }

    }

    return $field;
}
add_filter( 'wpforms_checkbox_field_display', 'wpf_dev_checkbox_choices_process_smarttags', 10, 3 );
```

## Reference Articles

- [How to Process Smart Tags in Checkbox Labels](https://wpforms.com/developers/process-smart-tags-in-checkbox-labels/ "How to Process Smart Tags in Checkbox Labels")
- [How to Customize Date Format in the Date Smart Tag](https://wpforms.com/developers/how-to-customize-date-format-in-the-date-smart-tag/ "How to Customize Date Format in the Date Smart Tag")

**Categories:** Filters Hooks

**Tags:** PHP

---

