Skip to content
This repository has been archived by the owner on Aug 2, 2019. It is now read-only.

Groups of fields with title and description #11

Closed
leplatrem opened this issue Jun 1, 2012 · 0 comments
Closed

Groups of fields with title and description #11

leplatrem opened this issue Jun 1, 2012 · 0 comments

Comments

@leplatrem
Copy link
Contributor

At model creation, it could be possible to define groups of fields:

SCHEMA = {
    name: "My super event",
    description: "",
    fields: [
        {   type: "string",
            name: "title",
            description: "blah",
        },
        {   name: "category",
            type: "enum",
            description: "blah",
            choices: ['sport', 'culture']
        },
        {   name: "street",
            type: "string",
        },
        {   name: "city",
            type: "string",
        },
    ],
    groups: [
        {  title: "Home",
           description:  "Your address helps us find you",
           fields: ["street", "city"]
        },
    ]
}

This would allow the UI to nicely layout the form for this model.

Since groups would be optional, they do not interfere with existing models, or those who don't need UI forms.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant