Create multiple contacts from one form submission

I need to create multiple contacts from one form submission. The number of contacts varies (depending on a number the user inputs in the same form).

Example:

There is a field: “Number of partners”

For each partner I need to request different information create a contact in hubspot with the properties requested.