[SOLVED] Form rendering in custom NodeType

Hey there,

I have created a contact form and would like to render it with this code in an own NodeType:
<form:render persistenceIdentifier="contact"/>

The form is rendered correctly, but clicking on the commit button only leads to a reload of the page.
When I include the form by adding a form element and selecting the form ID in the Backend, the finisher loads correctly.
Is there something else needed to do?

Thank you!
Matthias

Fusion objects are cached by default. Set it to uncached or dynamic for interactive components like forms. See the existing Forms Fusion object for reference.

This works great:

@cache {
        mode = 'dynamic'
        entryIdentifier {
            node = ${node}
        }
        entryDiscriminator = ${request.httpRequest.methodSafe ? 'static' : false}
        context {
            1 = 'node'
            2 = 'documentNode'
        }
    }

Thank you!

1 Like