Dynamically growing forms

I'm writing a web-app which has a form so that users can input the details of Thing A. Thing A is associated with at least 1 Thing B, which are also user-defined. Is there a pattern or some examples of forms which have this kind of relationship, where users can 'add another' Thing B to their Thing A in a form that grows organically to the users requirements.

enter image description here