rfuehricht / formhandler-ajax
Add AJAX capability to Formhandler. File upload, validation, submit.
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:typo3-cms-extension
Requires
- php: ^8.1
- rfuehricht/formhandler: ^13
- typo3/cms-backend: ~12.4 || ~13.4
README
Add AJAX capability to Formhandler. File upload, validation, submit.
Usage
Use Formhandler AJAX viewhelper to render your form.
This will automatically enable AJAX file upload.
To enable AJAX submit of the form set option ajaxSubmit = 1
in your form's TypoScript setup.
Furthermore, a new ViewHelper for an AJAX based file removal button is added.
<html data-namespace-typo3-fluid="true" lang="en" xmlns:f="http://typo3.org/ns/fluid/ViewHelpers" xmlns:fh="http://typo3.org/ns/Rfuehricht/Formhandler/ViewHelpers" xmlns:fhajax="http://typo3.org/ns/Rfuehricht/FormhandlerAjax/ViewHelpers" xmlns:hcaptcha="http://typo3.org/ns/Waldhacker/Hcaptcha/ViewHelpers" > <fhajax:form enctype="multipart/form-data"> ... <f:if condition="{files.file -> f:count()} > 0"> <ul> <f:for as="file" each="{files.file}" key="index"> <li><div>{file.name} ({file.size -> f:format.bytes()}) <fhajax:fileRemoveButton file="{file}" removeElement="li" value="X" /> </div></li> </f:for> </ul> </f:if> ... </fhajax:form> </html>