Handling data from form in modal dialog
You can pass down your region's ID as parameters to your route. For example:

&lt;a class="use-ajax" data-dialog-options="{&amp;quot;width&amp;quot;:550, &amp;quot;dialogClass&amp;quot;: &amp;quot;my-region-class&amp;quot; }" data-dialog-type="modal" href="/route/to/custom/form/this-region"&gt;...&lt;/a&gt;


As explained here you can add arguments from the route to your form.

On the buildForm method you can have something like this

public function buildForm(array $form, FormStateInterface $form_state, $region = NULL) {
  // Your code...
  $form += [
    'button' =&gt; [
      '#type' =&gt; 'button',
      '#value' =&gt; $this-&gt;t('Submit this form),
      '#name' =&gt; 'ajax_trigger',
      '#ajax' =&gt; [
        'callback' =&gt; '::updateRegionAjaxCallback',
        'wrapper' =&gt; $region, // Assuming $region is the argument passed down.
        'method' =&gt; 'replace',
        'effect' =&gt; 'fade',
        'event' =&gt; 'click',
      ],
    ],
  ];
}


Later your callback method could look like.

public static function updateRegionAjaxCallback(array $form, FormStateInterface $form_state) {
  $response = new AjaxResponse();
  $response-&gt;addCommand(new AppendCommand(NULL, [
    // Your render array with the data to be displayed.
    '#cache' =&gt; [
      'max-age' =&gt; Cache::PERMANENT,
      'contexts' =&gt; ['url'],
    ],
  ]));

  return $response;
}


This should work but keep in mind that will be best capture the form submit and triggering a custom AJAX event.