WPForms, Display description above field

WPForms displays field descriptions below the field by default, but this can be changed very easily with a few lines of code.

/**
 * WPForms, description above field
 * @author Bill Erickson
 * @link https://www.billerickson.net/code/wpforms-description-above-field
 *
 * @param array $properties, field properties
 * @return array
 */
function ea_wpforms_description_above_field( $properties ) {
	$properties['description']['position'] = 'before';
	return $properties;
}
add_filter( 'wpforms_field_properties', 'ea_wpforms_description_above_field' );

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