Build a form dynamically with the results of a view?
Build the custom form from inside the view and attach it to the view before rendering:

mymodule.module

/**
 * Implements hook_views_pre_render().
 */
function mymodule_views_pre_render($view) {
  if ($view-&gt;id() == 'myview') {
    // get field values from the view result
    $values = [];
    foreach ($view-&gt;result as $row_id =&gt; $row) {
      foreach ($view-&gt;field as $field_id =&gt; $field ) {
        $values[$row_id][$field_id] = $field-&gt;getValue($row);
      }
    }
    // build form with the view result
    $form = \Drupal::formBuilder()-&gt;getForm('Drupal\mymodule\Form\MyForm', $values);
    // attach the form to the view
    $view-&gt;attachment_after = $form;
  }
}


Use the view result for building the form:

/src/Form/MyForm.php

class MyForm extends FormBase {

  public function buildForm(array $form, FormStateInterface $form_state, array $values = NULL) {
    // build form with $values
  }