Project

General

Profile

Actions

Bug #87538

closed

Custom form template in yaml definition does not work

Added by Bernhard Eckl about 5 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Form Framework
Target version:
-
Start date:
2019-01-24
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
8
PHP Version:
7.0
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

I have set a custom template path in the global yaml configuration, but it always uses the standard template. Here is my setup:

TYPO3:
CMS:
Form:
persistenceManager:
allowedFileMounts:
100: 1:/asf/
110: 1:/sdgesg/
120: 1:/rwhgwrth/
130: 1:/wrthwrth/
140: 1:/oertherthert/
150: 1:/ertherth/
160: 1:/terjertjetrj/
170: 1:/oetherth/
allowSaveToExtensionPaths: false
allowDeleteFromExtensionPaths: false
#allowedExtensionPaths:
#10: EXT:example/Resources/Private/Forms/
formManager:
dynamicRequireJsModules:
app: 'TYPO3/CMS/Form/Backend/FormManager'
viewModel: 'TYPO3/CMS/Form/Backend/FormManager/ViewModel'
stylesheets:
100: 'EXT:form/Resources/Public/Css/form.css'
translationFile: 'EXT:form/Resources/Private/Language/Database.xlf'
javaScriptTranslationFile: 'EXT:form/Resources/Private/Language/locallang_formManager_javascript.xlf'
selectablePrototypesConfiguration:
100:
identifier: 'standard'
label: 'formManager.selectablePrototypesConfiguration.standard.label'
newFormTemplates:
500:
templatePath: 'EXT:tezhetrzherzth/EventForm.yaml'
label: 'Veranstaltungsformular'
prototypes:
standard:
formElementsDefinition:
Form:
renderingOptions:
templateRootPaths:
100: 'assets/templates/ext/formframework/Templates/'

Actions #1

Updated by Bernhard Eckl about 5 years ago

TYPO3:
  CMS:
    Form:
      persistenceManager:
        allowedFileMounts:
          100: 1:/sadf/
          110: 1:/asdf
          120: 1:/asdf/
          130: 1:/asdfas/
          140: 1:/asdfasf
          150: 1:/ergvqerw/
          160: 1:/refqerfn/
          170: 1:/qfewfqwe/
        allowSaveToExtensionPaths: false
        allowDeleteFromExtensionPaths: false
        #allowedExtensionPaths:
          #10: EXT:example/Resources/Private/Forms/
      formManager:
        dynamicRequireJsModules:
          app: 'TYPO3/CMS/Form/Backend/FormManager'
          viewModel: 'TYPO3/CMS/Form/Backend/FormManager/ViewModel'
        stylesheets:
          100: 'EXT:form/Resources/Public/Css/form.css'
        translationFile: 'EXT:form/Resources/Private/Language/Database.xlf'
        javaScriptTranslationFile: 'EXT:form/Resources/Private/Language/locallang_formManager_javascript.xlf'
        selectablePrototypesConfiguration:
          100:
            identifier: 'standard'
            label: 'formManager.selectablePrototypesConfiguration.standard.label'
            newFormTemplates:
              500:
                templatePath: 'EXT:dgwerg/Resources/Private/Yaml/NewForms/EventForm.yaml'
                label: 'Veranstaltungsformular'
      prototypes:
        standard:
          formElementsDefinition:
            Form:
              renderingOptions:
                templateRootPaths:
                  100: 'assets/templates/ext/formframework/Templates/'

Actions #3

Updated by Bernhard Eckl about 5 years ago

My template is not in an extension, that‘s why I have no path with ext:.
But nevertheless, I also tried EXT:extname/Resources/Private/formframework/Templates/, no luck.

(In Templates/ I have Finishers/Confirmation/Confirmation.html)

Actions #4

Updated by Bernhard Eckl about 5 years ago

Here is the solution (finishers is different):

      prototypes:
        standard:
          finishersDefinition:
            Confirmation:
              implementationClassName: 'TYPO3\CMS\Form\Domain\Finishers\ConfirmationFinisher'
              options:
                #message: ''
                #variables:
                templateName: 'Confirmation'
                templateRootPaths:
                  100: 'path/Resources/Private/formframework/Templates/Finishers/Confirmation/'

I think form ext needs a documentation update.

Actions #6

Updated by Bernhard Eckl about 5 years ago

Ok :)
Thanks!

Actions #7

Updated by Ralf Zimmermann about 5 years ago

  • Status changed from New to Closed
Actions

Also available in: Atom PDF