Skip to content

Template fragment syntax #6

@mohsen1

Description

@mohsen1

Each piece of the form should be made of a template fragment. A template fragment is a Handlebars HTML file that has fields related to that fragment.

For example, for boolean type we will have a checkbox. This is the proposal for the template fragment for boolean type:

<!---
  Boolean type
  ==========

  Fileds:
  name (string) - the name of the property: 
  title (string) - The title property

  Example Schema:
  {
    "type": "boolean",
    "title": "In the U.S."
  }
-->
<label>
   {{name}}
   <input type="checkbox" title="{{title}}>
</label>

Fragments should be well documented. Maybe we can fix the format of documentations and make a tool for validating fragments. Documentations makes it very easy to customize.

Question:

Should we put each fragments style in a inline <style> tag inside the html?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions