Home / Admin / Change Sublabels for the Email Field
Duplicate Snippet

Embed Snippet on Your Site

Change Sublabels for the Email Field

Using this snippet will allow you to customize the sublabels that appear under the Email field when the Email Confirmation option is enabled on the Email form field.

<10
Code Preview
php
<?php
/**
 * Customize email field properties.
 *
 * @link https://wpforms.com/developers/how-to-change-sublabels-for-the-email-field/
 * 
 * For support, please visit: https://www.facebook.com/groups/wpformsvip
 */
 
function wpf_dev_email_field_properties( $properties, $field, $form_data ) {
      
    // Change the text for the sublabel
    $properties[ 'inputs' ][ 'primary' ][ 'sublabel' ][ 'value' ]   = __( 'Enter Your Email', 'plugin-domain' );
    $properties[ 'inputs' ][ 'secondary' ][ 'sublabel' ][ 'value' ] = __( 'To confirm, re-enter your email address here', 'plugin-domain' );
  
    return $properties;
 
}
 
add_filter( 'wpforms_field_properties_email' , 'wpf_dev_email_field_properties', 10, 3 );

Comments

Add a Comment