vfbp_field_description

Description

Filter the field's Description property.

Changing this value will alter the description that is displayed and will most commonly be used by WPML users.

Parameters

$description
(string) (required) The field description
Default: The field description

$field_id
(int) (optional) The field ID
Default: the field ID

$form_id
(int) (optional) The form ID
Default: the form ID

Examples

Change the description of a field based on the language if the  WPML plugin is installed:

add_filter( 'vfbp_field_description', 'filter_vfbp_field_description', 10, 3 );

function filter_vfbp_field_deascription( $description, $field_id, $form_id ){    
    // if the WPML plugin is not installed, return the default field name
    if ( !defined( 'ICL_LANGUAGE_CODE' ) )
        return $description;

    // the ICL_LANGUAGE_CODE constant is part of the WPML plugin (wpml.org)
    if ( ICL_LANGUAGE_CODE == 'en' )
        $description = 'Please complete this field.';
    elseif ( ICL_LANGUAGE_CODE == 'fr' )
        $description = 'Se il vous plaƮt remplir ce champ.';

    return $description;
}