/** * Implements hook_form_submit(). */ function mymodule_myform_submit($form, &$form_state) { // Remove the 'password' field value from the submitted values array. $form_state->unsetValue('password'); }In this example, the unsetValue method is used to remove the value of the 'password' field from the submitted form values array. This can be useful for security reasons, as you may not want to store or process sensitive data in your form. Package library: Drupal core.form library.