TYPO3 8.7.17 EXT:form – Add select to custom finisher with DB registers

0

I followed the gist written by Xavier Perseguers in order to add a custom finisher available for forms I create with EXT:form in TYPO3 v8.

I have made some modifications to add a select.

# EXT:my_ext/Configuration/Yaml/CreateRequestActionFrontend.yaml
TYPO3:
  CMS:
    Form:
      prototypes:
          # add our finisher to the 'standard' form prototype
          standard:
            formElementsDefinition:
          Form:
            formEditor:
              editors:
                # 900 = 'finishers' in EXT:form/Configuration/Yaml/FormEditorSetup.yaml
                900:
                  selectOptions:
                    500:
                      value: 'CreateRequestAction'
                      label: 'Create request'

              propertyCollections:
                finishers:
                  500:
                    __inheritances:
                      10:'TYPO3.CMS.Form.mixins.FormEngineCreateRequestActionMixin'
                    identifier: 'CreateRequestAction'
                    editors:
                      __inheritances:
                        10: 'TYPO3.CMS.Form.mixins.formElementMixins.BaseCollectionEditorsMixin'
                      100:
                        label: 'Create request'
                      200:
                        identifier: 'requestType'
                        templateName: 'Inspector-SingleSelectEditor'
                        label: 'Request type'
                        propertyPath: 'options.requestType'
                        selectOptions:
                          10:
                            value: '1'
                            label: 'OPTION 1'
                          20:
                            value: '2'
                            label: 'OPTION 2'
                          30:
                            value: '3'
                            label: 'OPTION 3'

            finishersDefinition:
              CreateRequestAction:
                formEditor:
                  iconIdentifier: 't3-form-icon-finisher'
                  predefinedDefaults:
                    options:
                      requestType: '1'

      mixins:
        FormEngineCreateRequestActionMixin:
          elements:
            requestType:
              config:
                type: 'select'

On the other hand, I have domain objects stored in my database; I want those objects to be select options. My question is: How can I do that?

Thank you so much.