Passing form data to dynamic modal with button

I have not been able to figure out a way to pass the checkboxes from a grid to a dynamic modal for bulk actions - consider the code below, e.g get the selection to “selection_data” or in GET or whatever - perhaps there is a better way (With Static modal i can do it no rpoblem using jsInput->val($)):

$myview = $app->add(['View']);
$grid = $myview->add(['Grid']);
$grid->setModel($model);
$grid_selection = $grid->addSelection();
$bulk_button = $grid->menu->addItem('Bulk Operation');

$modal = $myview->add(['Modal','title'=>'Bulk it baby']);

$modal->set(
   function ($m)
   {
       $form = $m->add(['Form']);
       $form->addField('selection_data');
   }
);

$bulk_button->on('click',
   function ($j, $param) use ($modal)
   {
      // $param does right here contain the selection values
      // how do i get it to my modal, e.g. into the selection_data field   
      return [
         $modal->show()         
      ];
   }
   ,[$grid_selection->jsChecked()]
);

Hi, does this post help you out?: How can i get the selected Rows of a grid

I had not thought about using jsModal, dont think i tried that before - i will have to look into that, thank you