rfuehricht/formhandler-ajax

Add AJAX capability to Formhandler. File upload, validation, submit.

Maintainers

Package info

github.com/rfuehricht/formhandler-ajax

Type:typo3-cms-extension

pkg:composer/rfuehricht/formhandler-ajax

Statistics

Installs: 2

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

13.0.1 2025-07-03 13:15 UTC

This package is auto-updated.

Last update: 2026-03-03 15:53:53 UTC


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>