Create nodes unlimited times I've been trying to ajaxify the node creation form, the purpose?


Save the node and remains in the node creation page (Done)
If the user clicks the save button again save a new node


The second point is not working yet because once the Ajax request is sent again the previous created node is updated.

I tried with:

function saveAjaxForm(&amp;$form, FormStateInterface $form_state) {
  $response = new AjaxResponse();
  $response-&gt;addCommand(new AlertCommand('Saved'));

  return $response;
}


It works, but other #submit callbacks in the form aren't called again.

How can I "execute again" all the submit functions in the form?
For some weird reason the Ajax response wasn't updating the form_build_id value and the request takes it as the same form, so I added a new Ajax Command: 

function saveAjaxForm(&amp;$form, FormStateInterface $form_state) {
  $old_form_build_id = $form['#build_id'];
  $new_form_build_id = $old_form_build_id.rand();

  $response = new AjaxResponse();

  $response-&gt;addCommand(new UpdateBuildIdCommand($old_form_build_id, $new_form_build_id));
  $response-&gt;addCommand(new AlertCommand('Saved'));

  return $response;
}


It solves the issue.