You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To use unsubmittable Forms using Tollwerk\TwBase\Domain\Model\UnsubmittableFormDefinition, one has to register a hook for handling that in his own extension:
class YourClass {
publicfunctionafterInitializeCurrentPage(FormRuntime$formRuntime, CompositeRenderableInterface$currentPage = null, CompositeRenderableInterface$lastPage = null, array$requestArguments = []): ?CompositeRenderableInterface
{
// Handle unsubmittable forms (filters forms etc.).// Important: This condition MUST always be called last inside this functionif ($formRuntime->getFormDefinition() instanceof UnsubmittableFormDefinition) {
return$formDefinition->getPageByIndex(0);
}
}
}
Couldn't that be automatically handled by tw_base itself? I see that if you don't need that feature in your particular TYPO3 installation, registering and checking it anyway is a bit of overhead. But needing unsubmittable forms is such a common thing I think it could make sense to let tw_base handle that automatically.
The text was updated successfully, but these errors were encountered:
kftw
changed the title
Automatically register hook to check for checking UnsubmittableFormDefinition
Automatically register hook for checking UnsubmittableFormDefinition
Aug 28, 2020
To use unsubmittable Forms using
Tollwerk\TwBase\Domain\Model\UnsubmittableFormDefinition
, one has to register a hook for handling that in his own extension:ext_localconf.php
YourClass.php
Couldn't that be automatically handled by tw_base itself? I see that if you don't need that feature in your particular TYPO3 installation, registering and checking it anyway is a bit of overhead. But needing unsubmittable forms is such a common thing I think it could make sense to let tw_base handle that automatically.
The text was updated successfully, but these errors were encountered: