Commit 3a18cfde authored by Carsten  Rose's avatar Carsten Rose
Browse files

AbstractBuildForm.php: for Form subrecord columns, the default width limit of...

AbstractBuildForm.php: for Form subrecord columns, the default width limit of 20 chars are disabled in 'nostrip' is specifed.
parent 83ec7b7f
...@@ -123,12 +123,17 @@ Setup ...@@ -123,12 +123,17 @@ Setup
file8 = typo3conf/ext/qfq/Resources/Public/JavaScript/qfq.min.js file8 = typo3conf/ext/qfq/Resources/Public/JavaScript/qfq.min.js
} }
.. _form-editor:
FormEditor FormEditor
---------- ----------
Setup a *report* to manage all *forms*: Create a Typo3 page, set the 'URL Alias' to `form` and insert a content record of Setup a *report* to manage all *forms*:
type *qfq*. In the bodytext insert the following code:
* Create a Typo3 page.
* Set the 'URL Alias' to `form` (default) or the individual defined value in parameter EDIT_FORM_PAGE (config.qfq.ini).
* Insert a content record of type *qfq*.
* In the bodytext insert the following code:
:: ::
...@@ -362,7 +367,7 @@ Debug ...@@ -362,7 +367,7 @@ Debug
* Form: * Form:
* For every internal link/button, show tooltips with decoded SIP on mouseover. * For every internal link/button, show tooltips with decoded SIP on mouseover.
* Shows 'Edit form' (wrench symbol) button on a form. * Shows an 'Edit form'-button (wrench symbol) on a form. The link points to the T3 page with the :ref:`form-editor`.
* Report: Will be configured per tt-content record. * Report: Will be configured per tt-content record.
...@@ -663,7 +668,7 @@ Store: *TYPO3* (Bodytext) - T ...@@ -663,7 +668,7 @@ Store: *TYPO3* (Bodytext) - T
+-------------------------+-------------------------------------------------------------------+----------+ +-------------------------+-------------------------------------------------------------------+----------+
* **note**: not available * **note**: not available
* in 'dynamicUpdate' or * in :ref:`dynamic-update` or
* by *FormElement* class 'action' with type 'beforeSave', 'afterSave', 'beforeDelete', 'afterDelete'. * by *FormElement* class 'action' with type 'beforeSave', 'afterSave', 'beforeDelete', 'afterDelete'.
.. _STORE_VARS: .. _STORE_VARS:
...@@ -2111,7 +2116,7 @@ Type: sendmail ...@@ -2111,7 +2116,7 @@ Type: sendmail
Dynamic Update Dynamic Update
-------------- --------------
The 'Dynamic Update' feature makes a form more interactive. If a user change a *FormElement* who is tagged with The 'Dynamic Update' feature makes a form more interactive. If a user changes a *FormElement* who is tagged with
'dynamicUpdate', *all* elements who are tagged with 'dynamicUpdate', will be recalculated and rerendered. 'dynamicUpdate', *all* elements who are tagged with 'dynamicUpdate', will be recalculated and rerendered.
The following fields will be recalculated during 'Dynamic Update' The following fields will be recalculated during 'Dynamic Update'
...@@ -2125,6 +2130,15 @@ The following fields will be recalculated during 'Dynamic Update' ...@@ -2125,6 +2130,15 @@ The following fields will be recalculated during 'Dynamic Update'
To make a form dynamic: To make a form dynamic:
* Mark all *FormElements* with `dynamic update`=`enabled`, which should **initiate** or **receive** updates. * Mark all *FormElements* with `dynamic update`=`enabled`, which should **initiate** or **receive** updates.
See #3426 / Dynamic Update: Inputs loose the new content and shows the old value:
* On **all** `dynamic update` *FormElements* an explicit definition of `value`, including a sanatize class, is necessary
(except the field is numeric). **A missing definition let's the content overwrite all the time with the old value**.
A typical definition for `value` looks like::
{{<FormElement name>::alnumx}}
* Define the receiving *FormElements* in a way, that they will interpret the recent user change! The form variable of the * Define the receiving *FormElements* in a way, that they will interpret the recent user change! The form variable of the
specific sender *FormElement* `{{<sender element>:F:<sanitize>}}` should be part of one of the above fields to get an specific sender *FormElement* `{{<sender element>:F:<sanitize>}}` should be part of one of the above fields to get an
impact. E.g.: impact. E.g.:
...@@ -2132,8 +2146,9 @@ To make a form dynamic: ...@@ -2132,8 +2146,9 @@ To make a form dynamic:
[receiving *FormElement*].parameter: itemList={{ SELECT IF({{carPriceRange:FE:alnumx}}='expensive','Ferrari,Tesla,Jaguar','General Motors,Honda,Seat,Fiat') }} [receiving *FormElement*].parameter: itemList={{ SELECT IF({{carPriceRange:FE:alnumx}}='expensive','Ferrari,Tesla,Jaguar','General Motors,Honda,Seat,Fiat') }}
Remember to specify a 'sanatize' class - a missing sanatize class means 'digit', every content which is not numeric Remember to specify a 'sanatize' class - a missing sanatize class means 'digit', every content, which is not numeric,
violate the sanatize class and becomes therefore an empty string! violates the sanatize class and becomes therefore an empty string!
Examples Examples
^^^^^^^^ ^^^^^^^^
......
...@@ -2308,10 +2308,18 @@ abstract class AbstractBuildForm { ...@@ -2308,10 +2308,18 @@ abstract class AbstractBuildForm {
if (count($arr) == 1) if (count($arr) == 1)
$arr[1] = $arr[0]; $arr[1] = $arr[0];
$cell = isset($control['nostrip'][$columnName]) ? $columnValue : strip_tags($columnValue); // $cell = isset($control['nostrip'][$columnName]) ? $columnValue : strip_tags($columnValue);
if (isset($control['nostrip'][$columnName])) {
$cell = $columnValue;
$control['width'][$columnName] = false;
} else {
$cell = strip_tags($columnValue);
}
if ($control['width'][$columnName] !== false) if ($control['width'][$columnName] !== false && $control['width'][$columnName] != 0) {
$cell = substr($cell, 0, $control['width'][$columnName]); $cell = substr($cell, 0, $control['width'][$columnName]);
}
if (isset($control['icon'][$columnName])) { if (isset($control['icon'][$columnName])) {
$cell = ($cell === '') ? '' : "<image src='" . PATH_ICONS . "/$cell'>"; $cell = ($cell === '') ? '' : "<image src='" . PATH_ICONS . "/$cell'>";
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment