Field value empty in submitForm I've got a form field that is empty ("") when I submit my form and I cant figure out where I am going wrong. The field in question is reason - as in the reason why this record is being changed. I also include vid because that field is set and passed properly. Full source code of the relevant form here

Form:

public function buildForm(array $form, FormStateInterface $form_state, $part = NULL, $vid = NULL) {
    $form = array();

    //...

    $form['wrapper_form_fields']['reason'] = [
      '#type' =&gt; 'textarea',
      '#title' =&gt; '&lt;span class="required"&gt;*&lt;/span&gt;' . t('Reason:'),
      '#value' =&gt; '',
      '#rows' =&gt; 2,
      '#attributes' =&gt; [
        'maxlength' =&gt; 250,
        'class' =&gt; ['js-modal-reason'],
      ],
      '#prefix' =&gt; '&lt;div class="reason-wrapper"&gt;',
      '#suffix' =&gt; '&lt;/div&gt;',
    ];

    $form['vid'] = array(
      '#type' =&gt; 'hidden',
      '#value' =&gt; $vid,
    );

    //...

    return $form;
  }


It appears to render out properly,







The parameter is passed in the HTTP request,







But when I dump it out in submitForm I get a blank value.

  public function submitForm(array &amp;$form, FormStateInterface $form_state) {
    parent::submitForm($form, $form_state);

    $reason = $form_state-&gt;getValue('reason');

    echo "&lt;pre&gt;";
    var_dump($reason);
    var_dump($form_state-&gt;getValues());
    echo "&lt;/pre&gt;";
    die;
    //...
  }


Output: 

&lt;pre&gt;string(0) ""
array(7) {
  ["vid"]=&gt;
  string(5) "78897"
  ["reason"]=&gt;
  string(0) ""
  ["send"]=&gt;
  object(Drupal\Core\StringTranslation\TranslatableMarkup)#1021 (5) {
  ...


Full source code of the relevant form here. One notable design decision is that most of the logic is in a parent class. I have a parent class InfusionCenterStatusForm that creates forms that will change the status of an instance of a content type. This base class is refined in child classes like InfusionCenterInactiveForm which will specialize the base form to set a record to be inactive.
You should remove the #value property. This is what is blanking it out. If you want it blank to start with, set #default_value instead.

See: https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Render%21Element%21Textarea.php/class/Textarea/8.6.x