diff --git a/extension/Documentation/Manual.rst b/extension/Documentation/Manual.rst index 3d7aba4acec69a1439d794fa053d44333550e6d1..ce9f06829a876e9d737cc1aedd922cc99456727c 100644 --- a/extension/Documentation/Manual.rst +++ b/extension/Documentation/Manual.rst @@ -123,12 +123,17 @@ Setup file8 = typo3conf/ext/qfq/Resources/Public/JavaScript/qfq.min.js } +.. _form-editor: FormEditor ---------- -Setup a *report* to manage all *forms*: Create a Typo3 page, set the 'URL Alias' to `form` and insert a content record of -type *qfq*. In the bodytext insert the following code: +Setup a *report* to manage all *forms*: + +* 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 * Form: * 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. @@ -663,7 +668,7 @@ Store: *TYPO3* (Bodytext) - T +-------------------------+-------------------------------------------------------------------+----------+ * **note**: not available - * in 'dynamicUpdate' or + * in :ref:`dynamic-update` or * by *FormElement* class 'action' with type 'beforeSave', 'afterSave', 'beforeDelete', 'afterDelete'. .. _STORE_VARS: @@ -2111,7 +2116,7 @@ Type: sendmail 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. 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: * 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 specific sender *FormElement* `{{<sender element>:F:<sanitize>}}` should be part of one of the above fields to get an impact. E.g.: @@ -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') }} - 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! + Remember to specify a 'sanatize' class - a missing sanatize class means 'digit', every content, which is not numeric, + violates the sanatize class and becomes therefore an empty string! + Examples ^^^^^^^^ diff --git a/extension/qfq/qfq/AbstractBuildForm.php b/extension/qfq/qfq/AbstractBuildForm.php index 75bb0dd153ec8c9e45408125c4d3f4a21a32707b..4ba199787f74bd6d20cc68ae8e6215dbe1b86580 100644 --- a/extension/qfq/qfq/AbstractBuildForm.php +++ b/extension/qfq/qfq/AbstractBuildForm.php @@ -2308,10 +2308,18 @@ abstract class AbstractBuildForm { if (count($arr) == 1) $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]); + } if (isset($control['icon'][$columnName])) { $cell = ($cell === '') ? '' : "<image src='" . PATH_ICONS . "/$cell'>";