I am unable to remove the label from a form element of the registration form.
I have:
- Enabled the kint module for debugging
Implemented
hook_form_alter()
and tried to change the form variablesfunction drupalfresh_form_user_register_form_alter(&$form, FormStateInterface $form_state, $form_id) { kint($form); $form['field_company_name']['#attributes']['widget'][0]['#title'] = t(''); }
This doesn't change the form.
This is how the form element appears.