
form:
  properties:
    image:
      label: Image
      $type: switchableField
      field:
        name: imageSource
        $type: radioButtonGroupField
        datasource:
          $type: optionListDatasource
          options:
            - name: upload
              value: upload
            - name: asset
              value: asset
      itemProvider:
        $type: jcrChildNodeProvider
      forms:
        - name: upload
          properties:
            uimage:
              label: "Image:"
              $type: damUploadField
              mediaEditorSupportedMimeTypes: image.*
        - name: asset
          properties:
            aimage:
              label: "Image:"
              $type: linkField
              itemProvider:
                $type: jcrChildNodeProvider¨
                nodeName: "image"
              chooser:
                workbenchChooser:
                  appName: dam-chooser
        - name: none
          properties:
            none:
              $type: hiddenField
    title:
      label: Image title
      $type: textField
      light: true
    caption:
      label: Image caption
      $type: textField
      light: true
  layout:
    $type: tabbedLayout
    tabs:
      tab1:
        label: Main properties
        fields:
          - name: image
          - name: title
          - name: caption
      tab2:
        label: Permissions
        fields:
          - name: groups
label: Properties