Giter Club home page Giter Club logo

form_extended's Introduction

form_extended

What does it do?

It extends the form extension with the following features:

  • Double opt-in controller + finisher for realising a registration process
  • country select box by using static_info_tables
  • CopyToSenderEmailFinisher:
  • Multiple file upload support Multiple file upload!
  • Privacy policy checkbox: Set ID of policy page
  • New property fields:
    • info
    • hide title
    • hide in receiver mail
    • hide in sender mail
  • Registration functions
    • extendable alternative to sf-register
    • Double Opt-In
    • fully integrated with form
    • design flexibility
    • add your own fields
    • spam protection
    • extendable with typical form methods like YAML

Feature: Set senders in site configuration

With the sender-in-site feature, administrators can define valid senders in the site configuration and editors can select them in the plugins.

First step: Activate the feature in the side wide options.

Activation!

Second step: Configure new valid addresses

Sites configuration!

It is no longer possible to set the sender manually.

Finisher settings!

Third step: Choose sender address in plugin

Plugin settings!

form_extended's People

Contributors

svewap avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

form_extended's Issues

Uncaught TypeError: Cannot read properties of undefined at FileUpload.js

Using Form with File Upload and Enable multiple file upload activated i get the following errors:

Uncaught TypeError: Cannot read properties of undefined (reading 'querySelectorAll')
at FileUpload.js?1718030282:55:55
at NodeList.forEach (<anonymous>)
at FileUpload.js?1718030282:29:46
Uncaught TypeError: Cannot read properties of undefined (reading 'appendChild')
at HTMLInputElement.<anonymous> (FileUpload.js?1718030282:47:59)

Using
TYPO3 12.4.16
form_extended 12.1.3

The error seems to have purely visual effects, namely that the selected files are not displayed as a "tag" with a "delete" button.

It seems that inside Frontend/Partials/FielUpload.html

<f:if condition="{element.properties.multiple}">
    <div class="multiupload-files">
        <f:if condition="{resources}">
            <f:for as="resource" each="{resources}" iteration="iterator">
                <span data-target="#{element.uniqueIdentifier}-file-reference-{iterator.index}" class="multiupload-file-block" id="{element.uniqueIdentifier}-preview-{iterator.index}">
                    <span class="multiupload-file-delete"><span>+</span></span>
                    <span class="name">{resource.originalResource.originalFile.name}</span>
                </span>
            </f:for>
        </f:if>
    </div>
</f:if>

not rendered because {element.properties.multiple} is NULL

11.0.8 Error 500

After update to 11.0.8 I get an error 500

TYPO3 11.5.36 - Composer installation

(1/1) ParseError
syntax error, unexpected '|', expecting ';' or '{'

in /var/www/html/public/typo3conf/ext/form_extended/Classes/Mvc/Property/TypeConverter/UploadedFileReferenceConverter.php line 107

Multiple Upload not working on mobile device (iphone)

If the "multiple" attribute is specified with a value of "1", it will be interpreted as a simple "input" field, allowing only a single file to be uploaded.

In the template FileUpload.html it helps if the attribute multiple is filled with the following condition:

multiple="{f:if(condition: '{element.properties.enableMulitple}', then: 'multiple')}"

Multiple upload files selection not working in FE form

Environment

TYPO3 12.4.16
Composer installation

Issue

Multiple upload not working in FE form. Backend Form Generator shows enable multiple uploads switch.
input looks like this
<input class="form-control" id="angebot-44-fileupload-2" accept="application/pdf" type="file" name="tx_form_formframework[angebot-44][fileupload-2]">

mind the missing multiple

Note: Backend Form Generator preview has this value.

Reproduction

  1. Install extension
  2. run upgrade wizard
  3. create new form
  4. add upload field and enable multiple uploads switch
  5. add form to page
  6. view in frontent

[BUG] sys_file_reference:uid_local remains zero (0)

While sending files as attachments works like a charm, two other things seem broken.

[concerned versions: the latest on TER and also the latest on github, both being installed in a TYPO3 v11]

I think, these two things are very tightly connected to each other, thus only make one ticket.

The file gets uploaded, but the setting saveToFileMount is completely ignored.
Thus it's always stored in 1:/user_upload/ ... then some folder name "form_%hash"" ...

____EDIT: above problem is resolved with v11.0.8

Remaining problem:

The SaveToDatabase Finisher for file references is broken.

When using the finisher like described in the official docu, it works like a charm without form_extended.
With this ext, the uid_local of sys_file_reference is always just '0' (zero), which breaks the connection between sys_file_reference and sys_file.
Thus I end up in having a broken file reference in DB.
Summary:

  • sys_file gets filled with correct data
  • my db-field gets filled with correct uid
  • sys_file_reference gets filled with corret data, but missing value for uid_local

I am not sure, but the error might occur in
https://github.com/WapplerSystems/form_extended/blob/release/v11/Classes/Mvc/Property/TypeConverter/UploadedFileReferenceConverter.php

Would be nice to get some info on how to fix.

Here is an example DatabaseFinisher:
https://typo3.slack.com/archives/C093RB4P9/p1698913292146829

Do not use jQuery

The JS for the multiple fileupload uses jQuery. Vanilla JS would be better and future proof.
I will create a PR for this.

[BUG] in release/v12 "Argument 'accept' has already been defined, thus it should not be defined again."

at TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper->registerArgument('accept', 'array', 'Values for the accept attribute', false, array())
in /app/vendor/wapplersystems/form_extended/Classes/ViewHelpers/Form/UploadedResourceViewHelper.php line 78

Argument "accept" is used twice

$this->registerTagAttribute('accept', 'string', 'Specifies the allowed file extensions to upload via comma-separated list, example ".png,.gif"');
[...]
$this->registerArgument('accept', 'array', 'Values for the accept attribute', false, []);

Uploads as attachment error and not displayed correctly in email

If I want to send the uploads as attachments, I always get a getContents error message.
If I only save the files, the following string is displayed in the email for each file:

TYPO3\CMS\Form\Mvc\Property\TypeConverter\PseudoFileReference:

The file is saved in the file system in the folder (as an example) "form_adfaefidfae820f30afef03030d" - it is therefore difficult to assign which folder belongs to which e-mail - it would be best to include a link to the file here, then the folder does not matter.


Wenn ich die Uploads als Anhang verschicken möchte erhalte ich immer eine getContents Fehlermeldung.
Wenn ich die Dateien nur abspeichern lasse, dann wird mir in der E-Mail pro Datei folgender String angezeigt:

TYPO3\CMS\Form\Mvc\Property\TypeConverter\PseudoFileReference:

Abgespeichert wird im Dateisystem im Ordner (als beispiel) "form_adfaefidfae820f30afef03030d" - ist also schlecht zuordenbar welcher Ordner zu welcher E-Mail gehört - hier sollte am besten ein Link zur Datei rein, dann ist auch der Ordner egal.

Multiple Upload not working

The multiple upload does not work because the attribute multiple is filled with {element.properties.multiple} in the template FileUpload.html. It should probably be called {element.properties.enableMulitple}.

BUG: Using form with steps and multiple file upload causes error "#1297759968 TYPO3\CMS\Extbase\Property\Exception"

#1297759968 TYPO3\CMS\Extbase\Property\Exception
Exception while property mapping at property path "": Property "0" was not found in target object of type "TYPO3\CMS\Extbase\Domain\Model\FileReference".

at TYPO3\CMS\Extbase\Property\PropertyMapper->convert(array(null, null), 'TYPO3\CMS\Extbase\Domain\Model\FileReference')
in /app/web/typo3conf/ext/form_extended/Classes/ViewHelpers/UploadedResourcesViewHelper.php line 54

return $this->propertyMapper->convert($resource, FileReference::class);

when $resource is array because of multiple file upload.

Environment:
Typo3 11.5.22
PHP 8.1.2
form_extend 11.0.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.