.. include:: ../Includes.txt


.. _faq:

===
FAQ
===


.. _faq-override-frontend-templates:

How do I override the frontend templates?
=========================================

There are 2 possible ways to override the frontend templates.


Globally extend the fluid search paths
--------------------------------------

Since EXT:form mainly uses YAML as configuration language you need to
register your own additional YAML files. Let us assume you are using a
sitepackage ``EXT:my_site_package`` which contains your whole frontend
integration.


EXT:my_site_package/Configuration/TypoScript/setup.txt
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

First of all, register a new EXT:form configuration for the frontend via
TypoScript.

.. code-block:: typoscript

    plugin.tx_form {
        settings {
            yamlConfigurations {
                # register your own additional configuration
                # choose a number higher than 30 (below is reserved)
                100 = EXT:my_site_package/Configuration/Yaml/CustomFormSetup.yaml
            }
        }
    }


EXT:my_site_package/Configuration/Yaml/CustomFormSetup.yaml
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Next, define the additional fluid template search paths via YAML.

.. code-block:: yaml

    TYPO3:
      CMS:
        Form:
          prototypes:
            standard:
              formElementsDefinition:
                Form:
                  renderingOptions:
                    templateRootPaths:
                      20: 'EXT:my_site_package/Resources/Private/Form/Frontend/Templates/'
                    partialRootPaths:
                      20: 'EXT:my_site_package/Resources/Private/Form/Frontend/Partials/'
                    layoutRootPaths:
                      20: 'EXT:my_site_package/Resources/Private/Form/Frontend/Layouts/'

.. note::
   The preview within the form editor (backend module) uses the frontend
   templates as well. If you want the preview to show your customized
   templates, register the new paths for the backend module as well.


EXT:my_site_package/ext_typoscript_setup.txt
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Register your EXT:form configuration for the backend via TypoScript. Read
the :ref:`chapter <concepts-configuration-yamlregistration-backend>` to
learn why we recommend using the concept behind ``ext_typoscript_setup.txt``.

.. code-block:: typoscript

    module.tx_form {
        settings {
            yamlConfigurations {
                100 = EXT:my_site_package/Configuration/Yaml/CustomFormSetup.yaml
            }
        }
    }


.. _faq-migrate-from-v7:

How do I migrate from EXT:form v7?
==================================

The old form extension (used in TYPO3 v7, which is compatible to TYPO3 v6)
was moved into an own extension called ``form_legacy``.  This extension can
be found within the official `TER <https://typo3.org/extensions/repository/view/form_legacy>`_.
When upgrading to TYPO3 v8 an upgrade wizard will tell you if form_legacy is
still needed.


.. _faq-frontend-validation:

Is there a frontend validation?
===============================

Yes, an HTML 5 based frontend validation is implemented. Nevertheless,
there is no JavaScript validation. This has to be integrated manually.
Reliable and maintained projects are `Parsley <https://github.com/guillaumepotier/Parsley.js>`_
and `jQuery Validation <https://github.com/jquery-validation/jquery-validation>`_.


.. _faq-localize-client-side-validations:

How do I localize the client side validations in the frontend?
==============================================================

The displayed validation message is a browser specific text. The output is
not generated by TYPO3 and therefore you cannot change it easily.
Nevertheless, there is a JavaScript solution for changing the validation
message. See `Stack Overflow <http://stackoverflow.com/questions/5272433/html5-form-required-attribute-set-custom-validation-message>`_
for more information.


.. _faq-date-picker:

How does the date picker work?
==============================

EXT:form ships a datepicker form element. To unfold its full potential you
should add jquery JavaScript files and jqueryUi JavaScript and CSS files to
your frontend.


.. _faq-user-registration:

Is it possible to build a frontend user registration with EXT:form?
===================================================================

Possible, yes. But we are not aware of an integration.


.. _faq-export-module:

Is there some kind of export module for saved forms?
====================================================

Currently, there are no plans to implement such a feature. There are huge
concerns regarding the data privacy when it comes to storing user data in
your TYPO3 database permanently.