Get field value in Form alter drupal 8
syntax: $form_state->getValue('machine name');
to get machine name print $form_state->getValue(); // it will show all value of form
$field_e_mail_address=$form_state->getValue('field_e_mail_address');
$emailId=$field_e_mail_address[0]['value'];
0 comments: