#
# Default (dynamic) form configuration. This data is used as the initial,
# minimal data for dynamic forms that ships with the system.
#
# Fields:
# id:       Used only if associated with a help topic
# title:    Bold section title of the form
# instructions: Title deck, detailed instructions on entering form data
# notes:    Notes for the form, shown under the fields
# deletable: True if the form can be removed from the system
# fields:   List of fields for the form
#   type:       Field type (short name) (eg. 'text', 'memo', 'phone', ...)
#   label:      Field label shown to the user
#   name:       Name used with the data internally. This is especially
#               useful for page and email templates, where %{ ticket.<name> }
#               will be used to retrieve the data from the field.
#   hint:       Help text shown with the field
#   edit_mask:  Mask out edits to the field (1=>delete, 2=>change name,
#                   4=>privacy setting, 8=>requirement setting)
#   private:    True if the field should be hidden from the client
#   required:   True if entry for the field is required
#   configuration: Field-specific configuration
#     size:     (text) width of the field
#     length:   (text) maximum size of the data in the field
#     cols:     (memo) width of the textarea
#     rows:     (memo) height of the textarea
#
---
- id: 1
  type: U # notrans
  title: Contact Information
  deletable: false
  fields:
    - type: text # notrans
      name: email # notrans
      label: Email Address
      required: true
      sort: 1
      edit_mask: 15
      configuration:
        size: 40
        length: 64
        validator: email # notrans

    - type: text # notrans
      name: name # notrans
      label: Full Name
      required: true
      sort: 2
      edit_mask: 15
      configuration:
        size: 40
        length: 64

    - type: phone # notrans
      name: phone # notrans
      label: Phone Number
      required: false
      sort: 3

    - type: memo # notrans
      name: notes
      label: Internal Notes
      required: false
      private: true
      sort: 4
      configuration:
        rows: 4
        cols: 40

- id: 2
  type: T # notrans
  title: Ticket Details
  instructions: Please Describe Your Issue
  notes: |
      This form will be attached to every ticket, regardless of its source.
      You can add any fields to this form and they will be available to all
      tickets, and will be searchable with advanced search and filterable.
  deletable: false
  fields:
    - type: text # notrans
      name: subject # notrans
      label: Issue Summary
      required: true
      edit_mask: 15
      sort: 1
      configuration:
        size: 40
        length: 50

    - type: thread # notrans
      name: message # notrans
      label: Issue Details
      hint: Details on the reason(s) for opening the ticket.
      required: true
      edit_mask: 15
      sort: 2

    - type: priority # notrans
      name: priority # notrans
      label: Priority Level
      required: false
      private: true
      edit_mask: 3
      sort: 3

- type: C # notrans
  title: Company Information
  instructions: Details available in email templates
  deletable: false
  fields:
    - type: text # notrans
      name: name # notrans
      label: Company Name
      required: true
      sort: 1
      edit_mask: 3
      configuration:
        size: 40
        length: 64

    - type: text # notrans
      name: website # notrans
      label: Website
      sort: 2
      configuration:
        size: 40
        length: 64

    - type: phone # notrans
      name: phone # notrans
      label: Phone Number
      required: false
      sort: 3
      configuration:
        ext: false

    - type: memo # notrans
      name: address
      label: Address
      required: false
      sort: 4
      configuration:
        rows: 2
        cols: 40
        html: false
        maxlength: 100

- type: O # notrans
  title: Organization Information
  instructions: Details on user organization
  deletable: false
  fields:
    - type: text # notrans
      name: name # notrans
      label: Name
      required: true
      sort: 1
      edit_mask: 15
      configuration:
        size: 40
        length: 64

    - type: memo # notrans
      name: notes
      label: Internal Notes
      required: false
      sort: 2
      configuration:
        rows: 4
        cols: 40
