Skip to content

'multiple' type field #50

Description

@pda-code

Bravo!!!!

This is the most clever and advanced piece of code i found on the internet for easy form development based on schema metadata. Well done!!!

i have an issue on multiple as

            schema: [
                { property: 'Id', type: 'text', attr: { required: true }, columns: 2, addons: [{ icon: "fa fa-users" }] },
                { property: 'OrderDate', type: 'date', attr: { required: true } },
                { property: 'OrderNumber', type: 'text' },
                {
                    type: 'multiple',
                    columns:4,
                    fields: [
                        { property: 'NumberOfItems', type: 'text' },
                        { property: 'CustomerId', type: 'select', list: 'item.Id as item.LastName + " " + item.FirstName  for item in vm.extra.customers', attr: { required: true } }
                    ]
                }
            ]

and the result is
2016-05-20_1409

You algorithm must be recursive.

When a field is "mutliple" i suggest to have a label as all the other fields so it occupies space (on the left or top) and for the actual control you just re-run the algorithm for the 'fields' properrty (because a "multiple" field has fields)

This way you can create unlimited nested form structure perfectly aligned!

More over you can introduce a new field of type "content" where the user can specify HTML markup in case he wants some complete custom special control.

P.S Please can you explain further the colOffset, col e.t.c classes used as options?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions