Obtaining all values from a built form I'm building a form and setting values via 

$form = \Drupal::formBuilder()-&gt;getForm('My\Module', ['key1' =&gt; 'x']);


where I set the passed key1 as the default values for the associated fields : in My\Module\buildForm, you would find

public function buildForm(array $form, FormStateInterface $form_state, $presets = array()) {

    $form['key1'] = [
      '#type' =&gt; 'textfield',
      '#default_value' =&gt; isset($presets['key1']) ? $presets['key1'] : $query-&gt;get('key1')
    ];

    return $form;
}


This takes place in a controller not directly related to the form and I'd like to retrieve all values set, either as defaults or as parameters of the page, something like ['key1' =&gt; 'x'] if no parameter is passed to the page or ['key1' =&gt; 'v1'] if the page is called with ?key1=v1

How can I get all the values on my form array (besides filtering on the field names)?
Probably you put the preset values in the default values of form elements. They are at this point only in $form. 

The values in $form_state are filled after the form is submitted, as a result of a GET/POST request.

But then your code, that calls the formBuilder, has no longer control. This will be handled by the submit method you have defined for the form.