I am struggling with opening a form with pre-filled values from fields saved in db(using Blaze and Meteor). I am inserting data with separate form. Once entries are made, I have set edit button in form of their displays. What i want to do is, Update that entry in db. For that when user click on edit button the edit form should open with pre-field entries. Now user can edit entries from here and update info.
I am new to meteor and used to do development in PHP. So i was doing same with JS and PHP, but here meteor is not picking those things.
What i am doing for making it work anyhow, is taking a helper in each Field and get its value from db(with the help of ID ) and the return back from helper functions. but i don’t think, this is a ok solution in anyway. Because ,if i write helper for each field, then inside that helper i have to use separate Mongo query to get data. Then return to main page. that means if form has 10 field, helpers are gonna hit db 10 times for data.
So, personally i don’t consider this ok solution.
If someone else know any good practice for this, please share.
Thanks in advance for those who are gonna put any effort.