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.

<?php
/**
* Smart Tags on HTML Field
*
* @author Bill Erickson
* @see 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 );
view raw functions.php hosted with ❤ by GitHub

Bill Erickson

Bill Erickson is a freelance WordPress developer and a contributing developer to the Genesis framework. For the past 14 years he has worked with attorneys, publishers, corporations, and non-profits, building custom websites tailored to their needs and goals.

Ready to upgrade your website?

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

Let's Talk