Drupal 8, very simple hierarchical form doesn't work In a custom module, I create a new form. In the buildForm function, I define my form : 

$form["planet"] = array(
  '#type' =&gt; 'textfield',
  '#title' =&gt; '1 : '.$this-&gt;t('planet'),
  '#maxlength' =&gt; 64,
  '#size' =&gt; 64,
  '#tree' =&gt; TRUE,
);

$form["planet"][0] = array(
  '#type' =&gt; 'textfield',
  '#title' =&gt; '0 : '.$this-&gt;t('land'),
  '#maxlength' =&gt; 64,
  '#size' =&gt; 64,
);

$form["planet"][1] = array(
  '#type' =&gt; 'textfield',
  '#title' =&gt; '1 : '.$this-&gt;t('land'),
  '#maxlength' =&gt; 64,
  '#size' =&gt; 64,
);

$form['submit'] = array(
  '#type' =&gt; 'submit',
  '#value' =&gt; t('Submit'),
);


There are 3 fields, but this is the result : 



Why there only first field displayed ?
You need change type $form["planet"] to fieldset or container. Don't use text field in this case:

$form["planet"] = array(
  '#type' =&gt; 'fieldset',
  '#title' =&gt; '1 : '.$this-&gt;t('planet'),
  '#collapsible' =&gt; TRUE, 
  '#collapsed' =&gt; FALSE,
);