Home Reference Source Repository
public class | source

form

Extends:

src/utils/view.js~View.default → form

UI Form

Example:

const form = new mdw.Form({
  element: document.body,
  template: {
    toolbar: {
      layout: 12,
      module: mdw.Toolbar,
      opts: {
        template: [{
          name: 'test',
          row: 3,
          section: 'start',
          module: mdw.Button,
          opts: {
            text: 'Name'
          }
        }]
      }
    },
    name: {
      layout: 3,
      module: mdw.Textfield,
      opts: {
        placeholder: 'Name'
      }
    },
    id: {
      layout: 3,
      module: mdw.Textfield,
      opts: {
        placeholder: 'Name'
      }
    },
    name1: {
      layout: 3,
      module: mdw.Textfield,
      opts: {
        placeholder: 'Name'
      }
    },
    id1: {
      layout: 3,
      module: mdw.Textfield,
      opts: {
        placeholder: 'Name'
      }
    }
  },
  data: {
    id: 'id',
    name: 'Bob',
    age: 16
  }
})

Constructor Summary

Public Constructor
public

constructor(options: *)

constructor

Method Summary

Public Methods
public

render(): void

render DOM elements

Public Constructors

public constructor(options: *) source

constructor

Params:

NameTypeAttributeDescription
options *

Public Methods

public render(): void source

render DOM elements

Return:

void