WPForms Smart Tags on HTML Field

Smart tags work a lot like shortcodes. You can define your own smart tags, and use them in different areas of WPForms (field descriptions, email notifications…). This adds smart tag support to the HTML field.

/**
 * Smart Tags on HTML Field
 *
 * @author Bill Erickson
 * @link http://www.billerickson.net/code/wpforms-smart-tags-html-field/
 *
 */
function ea_smart_tags_on_html_field( $field, $field_atts, $form_data ) {
    $field['code'] = wpforms()->smart_tags->process( $field['code'], $form_data );
    return $field;
}
add_filter( 'wpforms_html_field_display', 'ea_smart_tags_on_html_field', 10, 3 );

Bill Erickson

Bill Erickson is the co-founder and lead developer at CultivateWP, a WordPress agency focusing on high performance sites for web publishers.

About Me
Ready to upgrade your website?

I build custom WordPress websites that look great and are easy to manage.

Let's Talk