File created from a template, filled with data from the form

Is it possible to achieve something like this?

  1. User creates new document

  2. Choose template

  3. In the next step, based on the selected template, there are some fields to fill

  4. Created document contains, in the appropriate places, data from the fields filled in point 3

I think that i have seen video with something like this in Nextcloud. But i don’t know where, i can’t find it and i don’t know how to achieve this.