Skip to content
bahtuiv0.6.0

<baht-section>

Section divider inside a form: heading plus rule, no value, no events.

Inside a form

A field with type "section" renders this element; text (or label) is the heading.

<baht-form></baht-form>

<script>
  const el = document.querySelector('baht-form');
  el.form = {
    "form_id": "sectioned",
    "form_name": "Sectioned",
    "fields": [
      {
        "order": 1,
        "type": "section",
        "key": "about",
        "text": "About you"
      },
      {
        "order": 2,
        "type": "text",
        "key": "name",
        "label": "Name",
        "width": "1/2"
      },
      {
        "order": 3,
        "type": "section",
        "key": "request",
        "text": "The request"
      },
      {
        "order": 4,
        "type": "textarea",
        "key": "why",
        "label": "Why",
        "rows": 2
      }
    ]
  };
</script>
NameTypeDefaultDescription
fieldJSFieldDescriptorDescriptor with type "section"; text or label is shown