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

13.0.1 2025-07-03 13:15 UTC

This package is auto-updated.

Last update: 2025-07-03 14:32:58 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>