title: Form input not cleared after ajax submission
body: <p>I have a form with one field and a submit button with ajax submission option like following - </p>
  
  <pre><code>public function buildForm(array $form, FormStateInterface $form_state, $id = 0)
  {       
      $form['fieldset']['message'] = array(
          '#type' =&gt; 'textfield',
          '#default_value' =&gt; "",
          '#required' =&gt; true,
          '#attributes' =&gt; array(
              'placeholder' =&gt; t('write here'),
          ),
      );
  
      $form['actions']['submit'] = array(
          '#type' =&gt; 'submit',
          '#value' =&gt; $this-&gt;t('Send'),
          '#attributes' =&gt; array(
              'class' =&gt; array(
              ),
          ),
          '#ajax' =&gt; [
              'callback' =&gt; [$this, 'Ajaxsubmit'],
              'event' =&gt; 'click']
      );
      return $form;
  }
  </code></pre>
  
  <p>The ajax function is following -</p>
  
  <pre><code>public function Ajaxsubmit(array $form, FormStateInterface $form_state)
      {
          $user = \Drupal\user\Entity\User::load(\Drupal::currentUser()-&gt;id());
          $db_values = [
              "message" =&gt; $form_state-&gt;getValue("message"),
              "date_create" =&gt; date("Y-m-d H:i:s"),
          ];
          $save = DbStorage::Insert($db_values);
          //$('#mychat_form input').val("");
          //$form_state-&gt;setValue('content', NULL);
  
          $response = new AjaxResponse();
  
          if ($form_state-&gt;hasAnyErrors() || !$save) {
                 $response-&gt;addCommand(new AlertCommand('something wrong!'));
          } else {
  
          $message = DbStorage::Get(["id" =&gt; $save]);
          $send_id = $message-&gt;send_id;
          $build = [
                  '#theme' =&gt; "chat_view",
                  '#message' =&gt; $message,
                  '#sender' =&gt; $send_id,
                  '#current_user' =&gt; true
              ];
          $ans_text = render($build);
          $response-&gt;addCommand(new AppendCommand('#mychat', $ans_text));
          }
          return $response;
  
      }
  </code></pre>
  
  <p>Here form data submission is working fine. But input data is not cleared after submission. I tried to clear it from my javascript using - </p>
  
  <pre><code>$('#my_form input').val("");  
  </code></pre>
  
  <p>But the problem is my javascript file is called every 3 seconds and the form input is also cleared in every 3 seconds. this is problematic for users. Is there any other way to clear the form input after the ajax submission ? Can i do anything inside Ajaxsubmit function ?</p>