- 🇫🇷France sébastien-fr Nantes - France
I agree that address field 2 is not configurable in the UI if it is rarely used but the solution is not so easy to find when you do not know the address module. Thank you @ Berdir for providing us with this example.
I don't have any statics but the address_line2 field seems to me to be very widely used in France. It is used to indicate an additional address such as “building, floor, apartment”.
/** * Process callback for address element. */ function _custom_module_add_adress_label(array &$element, FormStateInterface $form_state, array &$complete_form) { $element['address_line2']['#title_display'] = 'before'; $element['address_line2']['#title'] = t('Building / Floor / Apt'); return $element; }