简体   繁体   中英

Typo3 Neos: How to insert a form into a template

Is it possible to insert a form build with TYPO3.Form into a template? I defined all needed fields in the .yaml file and would like to render this directly in the template and not insert it via the backend.

I'm not quite sure if i understand you correctly, but in your Typoscript configuration you can specifiy nodetypes which will be rendered on the page. I needed to render a form in a footer on all sites, here's my working configuration:

Root.ts2

footerData {
        form = TYPO3.Neos.NodeTypes:Form {
            formIdentifier = "minimal-contact-form"
        }
}

Default.html

...

{footerData.form -> f:format.raw()}

...

minimal-contact-form.yaml

type: 'TYPO3.Form:Form'
identifier: minimal-contact-form
label: 'Minimal Contact form'
...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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