Email us at info@henrytech.org to discuss your Drupal Migration today!
In the case that you need to have a form contained in a popup/modal window, that you also need to pass a parameter to, such as a specific node or entity id. In this case we are clicking on a link in a template file to open the form, and the entity id is available in the template file that has the link. You can also put such a link in a view, and pass it an id from the view. So you can have a view with a button for each row that references the ID from that row, that has a form that does something.
In your custom-template.html.twig file: