how to reorganize with twig a form builded in a custom module and keep working ajax callback? I've a form created programatically with a few fieldset and some inputs in these use ajax callback. The structure is like this :

$form['global']['controls'] = [
  '#type' =&gt; 'fieldset'
];

$form['global']['info'] = [
  '#type' =&gt; 'fieldset'
];

$form['global']['description'] = [
  '#type' =&gt; 'fieldset'
];


I've defined a theme template in my .module file and created the twig template. This is the twig template :

&lt;div&gt;
  {{ form.global.info }}
  {{ form.global.controls }}
  {{ form.global.description }}
&lt;/div&gt;


The form display correctly but ajax callback don't work : the callback are executed but don't change the elements.

All callbacks work with this :

&lt;div&gt;
  {{ form }}
&lt;/div&gt;


But I can't rearange the form with this twig code.

What I want is the possibility to rearange the order of the fieldsets in twig : put the fieldset 'description' before 'info', or 'controls' before 'info', etc. And keep ajax callbacks working.

Is it possible? And how?
The solution for this case was just to add {{ form|without('global') }} at the end of the .twig file, like this :

&lt;div&gt;
  {{ form.global.info }}
  {{ form.global.controls }}
  {{ form.global.description }}
&lt;/div&gt;
{{ form|without('global') }}