How to open edit form in modal

You can either:

1: Pass a URL parameter and populate your form fields from that
2: (My preferred way) Simply use a Data Detail Region

As for the form itself it is no different than adding an update form on a regular page. It’s all exactly the same.