Skip to content

Instantly share code, notes, and snippets.

@Roy-Oto
Created May 6, 2021 03:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Roy-Oto/6d8104869365f733c2e75699cdbf505f to your computer and use it in GitHub Desktop.
Save Roy-Oto/6d8104869365f733c2e75699cdbf505f to your computer and use it in GitHub Desktop.
How to change the notation of a sub-label
function wpf_dev_name_field_properties( $properties, $field, $form_data ) {
// Change sublabel values
$properties['inputs']['first']['sublabel']['value'] = '名前';
$properties['inputs']['middle']['sublabel']['value'] = 'ミドルネーム';
$properties['inputs']['last']['sublabel']['value'] = '苗字';
return $properties;
}
add_filter( 'wpforms_field_properties_name' , 'wpf_dev_name_field_properties', 10, 3 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment