Using a modal to display a dynamic form?

So currently I am building an interface that consists of user created "Documents" which can have a variable number of "items" associated with it. The problem is that I am not sure what is the most ideal method to represent the aforementioned user workflows. Below is an early stage prototype which illustrates the issues.Would really appreciate any feedback on how I can improve the solution.

enter image description here