Creating a "modular" form system


#1

Hello,

I’m currently creating a form app. Users can create forms with different elements, for example:

Form of User A:
Name: [ ]
Favorite Number: [Dropdown]

Form of User B:
Name: [ ]
Address: [ ]

The problem is that every user can use as many form elements as he wishes. How can I code this variety of different form types the best way in meteor? There are endless possibilities of forms users can create.
I kinda need some “module system”. Every form element is a module and can be individually placed with its functionality.

And btw I’m using blaze.

Regards,
Fabian


#2

We used Semantic-UI (you can use any framework) and wrapped the field types we use in Blaze partials. Works really well.

And we pass to the Blaze partials an onChange handler which is called when a field changes. So your template can save / watch changing fields and react accordingly.