Sha256: 8ce1becc3417ee29a8597ea9558447c1a152868cc08bb6ff6642c37529e19bfc

Contents?: true

Size: 1.21 KB

Versions: 2

Compression:

Stored size: 1.21 KB

Contents

# The `Docs.views.BasicFormView` is an example of the `Luca.components.FormView`.
# In this basic example, the form contains a range of different fields.  They are
# rendered one on top of another.  You can get more advanced and nest containers within
# your form, or use a `@bodyTemplate` and specify your own DOM structure, and assign
# components to custom CSS selectors within it.
form = Docs.register    "Docs.views.BasicFormView"
form.extends            "Luca.components.FormView"

form.privateConfiguration
  # Any values you specify in the `@defaults` property will be
  # set on each of the components in this container.
  defaults:
    type: "text"

form.publicConfiguration
  # You can manually define a `@components` property, or in your component
  # definition you can use the special `contains` directive, the only difference
  # is your personal preference for readability.  I did it this way 
  components:[
    label: "Text Field One"
  ,
    type: "select"
    label: "Select Field One"
    collection:
      data:[
        ['Alpha','Alpha']
        ['Bravo','Bravo']
        ['Charlie','Charlie']
        ['Delta','Delta']
      ]
  ,
    type: "checkbox_field"
    label: "Checkbox Field"

  ]

form.register()  

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
luca-0.9.91 site/source/app/assets/javascripts/docs/views/views/form_view_examples/basic_example.coffee
luca-0.9.9 site/source/app/assets/javascripts/docs/views/views/form_view_examples/basic_example.coffee