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


(array) Sanitized field data.
(array) An array of field attributes such as label and description.
(array) Processed form settings/data, prepared to be used later.



More Information

This filter is applied to an array for specific form field attributes. Each form field will have its own unique name, for further information and examples, please review this snippet tutorial.


In this example shown below, the function will allow Smart Tags to be processed on field labels for the form ID 365. Just remember to change the form ID from 365 to match the specific form ID you’re wanting to run your code on.

Removing that check would run the code for all forms.

 * Run smart tags on all field labels.
 * @link
 * @param  array $field        Sanitized field data.
 * @param  array $field_atts   Field attributes.
 * @param  array $form_data    Form data and settings.
 * return  array
function wpf_dev_textarea_field_display( $field, $field_atts, $form_data ) {

    if ( $form_data[ 'id' ] != 365 ) {
        return $field;
    $field[ 'label' ] = wpforms()->smart_tags->process( $field[ 'label' ], $form_data );

    return $field;

add_filter( 'wpforms_textarea_field_display', 'wpf_dev_textarea_field_display', 10, 3 );

Reference Articles