简体   繁体   English

TYPO3 表单多选框部分

[英]TYPO3 Form Multicheckbox Partial

I tried to edit the core file form\Resources\Private\Frontend\Partials\Field\Field.html to change the html output in the frontend.我尝试编辑核心文件 form\Resources\Private\Frontend\Partials\Field\Field.html 以更改 frontend.中的 html output If I change that file, it has not effetcs.如果我更改该文件,它没有效果。 If I change the core file form\Resources\Private\Frontend\Partials\Textarea.html it effects the output in the frontend.如果我更改核心文件 form\Resources\Private\Frontend\Partials\Textarea.html 它会影响前端的 output。

I've tried to set a custom partial, layout and templates folder like this: I've set the following in the setup part of the page template:我尝试像这样设置自定义部分、布局和模板文件夹:我在页面模板的设置部分设置了以下内容:

plugin.tx_form {
settings {
    yamlConfigurations {
        # register your own additional configuration
        # choose a number higher than 30 (below is reserved)
        100 = fileadmin/my_site_package/Configuration/Form/CustomFormSetup.yaml
    }
}
}

In fileadmin/my_site_package/Configuration/Form/CustomFormSetup.yaml I have在 fileadmin/my_site_package/Configuration/Form/CustomFormSetup.yaml 我有

TYPO3:
CMS:
Form:
  prototypes:
    standard:
      formElementsDefinition:
        Form:
          renderingOptions:
            templateRootPaths:
              20:'fileadmin/my_site_package/Resources/Private/Templates/Form/Frontend/'
            partialRootPaths:
              20: 'fileadmin/my_site_package/Resources/Private/Partials/Form/Frontend/'

In the folder fileadmin/my_site_package/Resources/Private/Partials/Form/Frontend/ I have the copied Multicheckbox.html and the other copied partial files from the form core folder.在文件夹 fileadmin/my_site_package/Resources/Private/Partials/Form/Frontend/ 我有复制的 Multicheckbox.html 和其他从表单核心文件夹复制的部分文件。 I have edited the Multicheckbox.html, but it has not effects to the frontend.我已经编辑了 Multicheckbox.html,但它对前端没有影响。

Thank you so much for your input.非常感谢您的意见。 The problem was because of the bootstrap package.问题是因为引导程序 package。 There was a file Multicheckbox.html in the folder "typo3conf/ext/bootstrap_package/Resources/Private/Partials/Form".文件夹“typo3conf/ext/bootstrap_package/Resources/Private/Partials/Form”中有一个文件 Multicheckbox.html。 This one overrided the core file Multicheckbox.html这个覆盖了核心文件Multicheckbox.html

But what am I doing wrong in my steps?但是我在我的步骤中做错了什么? I'm getting now the following error in the frontend:我现在在前端收到以下错误:

Oops, an error occurred.糟糕,发生错误。 Tried resolving a template file for controller action "FormFrontend->form" in format ",html".尝试以“,html”格式解析 controller 动作“FormFrontend->form”的模板文件。 but none of the paths contained the expected template file (FormFrontend/Form.html).但没有一个路径包含预期的模板文件(FormFrontend/Form.html)。 No paths configured.未配置路径。 More information regarding this error might be available online.有关此错误的更多信息可能在线提供。

Did I set the paths in CustomFormSetup.yaml wrong?我是否在 CustomFormSetup.yaml 中设置了错误的路径? I've also tried我也试过

TYPO3:
CMS:
Form:
  prototypes:
    standard:
      formElementsDefinition:
        Form:
          renderingOptions:
            templateRootPaths:
              1:'/my_site_package/Resources/Private/Templates/Form/Frontend/'
            partialRootPaths:
              1:'/my_site_package/Resources/Private/Partials/Form/Frontend/'

with the same error.有同样的错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM