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

feature(dynamic-forms): introduction to dynamic-forms module. closes(#8) #204

Merged
merged 46 commits into from
Dec 29, 2016

Conversation

emoralesb05
Copy link
Contributor

@emoralesb05 emoralesb05 commented Dec 21, 2016

Description

Introducing new module @covalent/dynamic-forms module. (CovalentDynamicFormsModule) #8

<td-dynamic-forms>

Use element to generate a form dynamically.

Pass an array of javascript objects that implement [ITdDynamicElementConfig] with the information to be rendered to the [elements] attribute.

export interface ITdDynamicElementConfig {
  label?: string;
  name: string;
  type: TdDynamicType | TdDynamicElement;
  required?: boolean;
  min?: any;
  max?: any;
  default?: any;
}

Properties:
image

Supported TdDynamicType

  • TdDynamicType.Text (renders md-input-container input type="text")
  • TdDynamicType.Number (renders md-input-container input type="number")
  • TdDynamicType.Boolean (renders md-slide-toggle)

Supported TdDynamicElement

  • TdDynamicElement.Input (renders md-input-container input type="text")
  • TdDynamicElement.Textarea (renders md-input-container textarea)
  • TdDynamicElement.Slider (renders md-slider)
  • TdDynamicElement.SlideToggle (renders md-slide-toggle)
  • TdDynamicElement.Checkbox (renders md-checkbox)

Test Steps

Screenshots or link to CodePen/Plunker/JSfiddle

image

@emoralesb05 emoralesb05 added this to the Alpha 0.10 milestone Dec 21, 2016
@emoralesb05 emoralesb05 changed the title feature(dynamic-forms): introduction to dynamic-forms module. (closes #8) feature(dynamic-forms): introduction to dynamic-forms module. closes(#8) Dec 23, 2016
@kyleledbetter
Copy link
Contributor

Is textarea supported now?

@emoralesb05
Copy link
Contributor Author

It is now in beta.1. so we can include it too after #209 is merged.

@emoralesb05
Copy link
Contributor Author

  • Added thumbLabel to slider
  • Added initial release of textarea.

@emoralesb05
Copy link
Contributor Author

Note: there is a bug with the input type
angular/components#2428

@kyleledbetter kyleledbetter merged commit b63d729 into develop Dec 29, 2016
@emoralesb05 emoralesb05 deleted the feature/dynamic-forms branch December 29, 2016 01:30
@zmitry
Copy link

zmitry commented Jan 14, 2017

Will form array and form group (for inputs composing ) be supported soon ?

@emoralesb05
Copy link
Contributor Author

emoralesb05 commented Jan 14, 2017

Can you elaborate on what you mean by form array and form group?

Also, might be better to create an issue for this kinds of questions or feature requests.

@zmitry
Copy link

zmitry commented Jan 15, 2017

@emoralesb05
i mean that your can write your config for nested forms something like this.
http://pastebin.com/cxn5Gg8Z

also your can check my repo with array and group components
https://github.com/kraken97/angular-form

`

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

Successfully merging this pull request may close these issues.

3 participants