meteor-tabular
meteor-tabular copied to clipboard
Is it possible to use Tabular inside of an Autoform?
I had an interesting idea which would make a form I'm building much more usable. Let me give you an example:
I have a "Work Scope" object, which contains potentially a large number of Worksope Items. All the item (description) are predefined, but the Unit Price and Unit can be customized for each Work Scope. The form should look something like this:
The WorkScope data is stored in a schema like this:
workscope_item = new SimpleSchema({
ws_type: {
type: String, //this Id should actually come from WorkItemDefinitions
},
unit_cost: {
type: Number,
optional: true
},
quantity: {
type: Number,
optional: true
},
});
WorkScope.attachSchema(new SimpleSchema({
workscope_item: {
type: [workscope_item],
},
}));
The types/descriptions are coming from another Schema that looks like this:
WorkItemDefinitions.attachSchema(new SimpleSchema({
work_item_description: {
type: String,
},
default_unit_price: {
type: Number,
optional: true,
decimal: true
},
}));
Currently, I can generate an autoform that looks like a bunch nested forms:
However, this is unusable for a large number of WorkItems. A Tabular form would be ideal for this kind of User Interface. Can you point me in the right direction on how to do this?
Thanks in advance.
You might be able to do it with each cell containing an entire autoform. It is really the same as the example here except that the autoform would be in your tabular cell template.
I have the inverse question:
Is it possible to use tabular to display a huge table and use autoform for create, update, delete records?
I think it should be possible, please point me in the right path to do it?
Thanks in advance.