Dynamically create fields on click

How would I be able to dynamically create fields? The form would already exist as a database but the use would have to click on “add” or “+” to add another set of fields from the same form.

The concept is for the trucking industry. A truck goes from place to place. Some places they pick up goods and the other they drop goods.

So the first form on the page would be “Add Pick Up Locations” and they would be able to add multiple location by clicking on add. The same process would be for delivering addresses as well.

Thanks,
Ali Pirani

I think you don’t need separate fields, i think you maybe need a separate ‘stops’ collection, with a relationship to journey. Each stop adds a record to that.

I am very interested in this subject. I too need to solve this issue. AdaloGuy, could you elaborate somewhat? Currently, I have created a list of stops inside the reservations collection: stop1, stop2, stop3 and so on. Do you think there is a better way to do it?