---
# indicator is the field that is used to test for form submission
indicator: submit

constraints:
    - SingleValue

filters:
    - TrimEdges
    
# Start listing the form elements
elements:
    - type: Text
      name: name
      label_loc: label_name
      # This is an optional 'mouse over' title pop-up
      attributes:
        title: Enter the name of the city
      constraints:
        - Required
        - Printable
      filters:
        - HTMLScrubber

    - type: Text
      name: zip
      label_loc: label_zip
      constraints:
        - Printable
      filters:
        - HTMLScrubber

    # Add a drop-down list for the country selection.  Note that we will
    # dynamically fill in all the cities from the controller but we
    # could manually set items in the drop-list by adding this YAML code:
    # options:
    #   - [ '1', 'Bastien' ]
    #   - [ '2', 'Nasseh'  ]
    - type: Select
      name: country
      empty_first: true
      empty_first_label_loc: label_empty
      label_loc: label_country
      constraints:
        - Required
        - Integer

    # The submit button
    - type: Submit
      name: submit
      value_loc: value_submit
      non_param: true

