TYPO3 extension Flux: Dynamic Fluid FlexForms
PHP JavaScript Other
Failed to load latest commit information.
Classes [DOC] Better document Form\Option\GroupViewHelper Jul 25, 2016
Resources [BUGFIX] Icon position in production and LTS Nov 7, 2015
Tests [FEATURE] Resolve controllers w/o requiring action method presence Jun 24, 2016
.editorconfig [BUGFIX] Change wrong brace expressions Nov 21, 2014
.gitignore [TASK] Adjust to new test base, Ignore composer.lock Nov 7, 2015
.travis.yml [TASK] No failures allowed with php7 Dec 28, 2015
CHANGELOG.md [DOC] Set release date for 7.4.0 in changelog May 16, 2016
CONTRIBUTING.md [DOC] Update contribution guide link Jan 26, 2015
LICENSE.md [TASK] Add license file Apr 18, 2014
README.md [TASK] Replace build status badge with Travis version Aug 2, 2015
bower.json [BUGFIX] Change bower name to fluidtypo3-flux Apr 14, 2014
class.ext_update.php [TASK] CGL - Remove multiple variable assignment, fix indents and exc… Aug 7, 2015
composer.json [TER] 7.4.0 May 16, 2016
ext_conf_template.txt [FEATURE] Toggle for list view editing of nested content Nov 12, 2015
ext_emconf.php [TASK] Set stability beta May 16, 2016
ext_icon.gif [INIT] Initial Git import Jan 18, 2012
ext_localconf.php [BUGFIX] Patch for new FormEngine and IRRE editing Feb 18, 2016
ext_tables.php [BUGFIX] Make compatible tx_flux_column TCA with latest master changes Oct 10, 2015
ext_tables.sql [BUGFIX] No prefix length for integer columns Jun 17, 2014
flux.json [FEATURE] Package API Dec 12, 2015
phpunit.xml.dist [TASK] Remove deprecated "strict" flag from phpunit Dec 13, 2015

README.md

Flux: Fluid FlexForms

Build Status Coverage Status Documentation Build Status Coverage Status

Flux is a replacement API for TYPO3 FlexForms - with interfaces for Fluid, PHP and TypoScript

Flux lets you build and modify forms in Fluid:

<flux:form id="myform">
  <flux:field.input name="myField" label="My special field" />
</flux:form>

In PHP:

$form = \FluidTYPO3\Flux\Form::create();
$form->setName('myform');
$form->createField('Input', 'myField', 'My special field');

In plain arrays (to allow sources like JSON):

$json = '{name: "myform", fields: [{"name": "myField", "type": "Input"}]}';
$asArray = json_decode($json, JSON_OBJECT_AS_ARRAY);
$form = \FluidTYPO3\Flux\Form::create($asArray);

And in TypoScript:

plugin.tx_flux.providers {
  myextension_myplugin {
    tableName = tt_content
    fieldName = pi_flexform
    listType = myextension_myplugin
    extensionKey = Vendor.MyPlugin
    form {
      name = myform
      fields {
        myField {
          type = Input
          label = My special field
        }
      }
    }
  }
}

All of which create the same form with a single input field called myField with a label value of My special field. The last example shows the form structure nested in a Provider (another Flux concept) which connects the pi_flexform field of the related tt_content plugin record type to the form.

Flux feature highlights

  • Added features for content elements - add content grids (following the backend_layout approach) to any content/plugin.
  • Multiple APIs to access the same features from many different contexts using the same naming and nesting style.
  • Multiple levels of API abstraction - when you need more control, lower API abstraction levels can be used in your code.
  • Flexible ways to replace individual parts: templates, controller actions, etc.
  • Manipulation of properties of existing forms - change field labels, default values, add fields, sheets, etc.
  • Data type transformations - define the desired target type and let the TypeConverters of Extbase handle conversion.
  • Possibility for custom components of your own - with the same API support any other Flux component has.
  • Several Utility-type classes for advanced integrations with Fluid in particular.

Known issues

  • Keep In mind to have your PHP/HTTP configured correctly to accept a fairly large number of input fields. When nesting sections / objects the number of fields submitted, rises drastically. The php.ini configuration setting to think about is max_input_vars. If this number is too small then the TYPO3 Backend (being PHP) will decline the submission of the backend editing form and will exit with an "Invalid CSRF Token" message because of incomplete (truncated) POST data.

Documentation