Monday, 6 June 2016

Get field value in Form alter drupal 8

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'];


banner
Previous Post
Next Post

0 comments: