I’ve been using Meteor for about 8 months now and have relied heavily on the autoform package when creating forms which has been fantastic however I’d like to take the next step and learn to manually create complex forms.
I’ve read that using simpleschema then manually building forms is a great way to go.
I understand the basics, however, I was hoping someone could point me in the right direct for a tutorial on the way to build insert/update forms that are complex and runs through select, checkboxes, etc.
Great question. I’d like to do this as well, but I’ll just add, manual (“inside template”) reactive client side form validation. This is the one feature that keeps me with Autoform.
Yeah, I’ve been looking for a solution and asking around about this for a long time now, I think with MDG’s shift to React and Apollo, that ship has sailed unfortunately. I’m having a hard time finding new tutorials and howto’s on Blaze these days.
I’m not sure what you mean by “standard forms”. I know how to do simple input textbox forms. What would be good is tutorial that creates an input/update form with things like, select-checkbox, select-options, etc. Plus validation with display errors when using simpleschema.
I’ve actually been thinking about doing a quick video on simple-react-form. I could see about putting something together for auto form as well. Can you give an example of the complexity you are looking for?
For instance, a form that had questions that have select-dropdown menus, multiple select-checkboxes, booleans, etc. It would also be good if you could show how one form can save answers to multiple collections. Another good thing might be, follow-on questions that change based on a person previous answer.
Some transition css effects to show one question at a time might be cool to.
Ie. select-dropdown
What brand soap do you use?
No brand
Omo
Finish
Select-checkboxes (array)
What car do you own?
Ford
-Camry
Follow on the question.
Do you drink wine or beer?
Beer - Next question lists beer brands
Wine - Next question lists wine brands
Just to be clear because you mentioned autoform, what we are looking for is a tut on how you can use simpleschema and create custom forms without using autoform.
Any help would be appreciated, so if you do make a tut, please let me know. It would great to learn.
Yes, validation is, but you would have to manually gather all the form data, compile it into the proper shape, feed it into simple-schema’s validation, and wire up the display of all the errors. AutoForm still allows you to create really complex forms through the use of afForm and afField without having to manually handle any of the other stuff.
I guess with autoform it is really worth checking out this folder right here, which will teach you how to create your own autoform-input-types, which is what we need more of in order to keep autoform alive: