Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI-generated form doesn't keep the type attribute from the model #102

Open
e2jk opened this issue Feb 18, 2015 · 0 comments
Open

CLI-generated form doesn't keep the type attribute from the model #102

e2jk opened this issue Feb 18, 2015 · 0 comments

Comments

@e2jk
Copy link
Contributor

e2jk commented Feb 18, 2015

A model containing this props (extract):

        numberOfRecords: ['number', false, '']

generates the following form by calling $ ampersand gen form client/models/object.js (extract)

            new InputView({
                label: "Number Of Records",
                name: "numberOfRecords",
                value: this.model.numberOfRecords || "",
                required: false,
                placeholder: "Number Of Records",
                parent: this
            })

The dataType is defined as "number" in the model, the form needs a corresponding type: 'number'.

I suppose changes need to be done to lib/gen-types/form.js and lib/templates/input.js, please advise.

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

No branches or pull requests

2 participants