Commit 522d1a36 authored by Carsten  Rose's avatar Carsten Rose
Browse files

Restructured doc for STORE_VARS

parent 20dafcd2
Pipeline #4971 passed with stages
in 3 minutes and 44 seconds
......@@ -1927,7 +1927,7 @@ and will be processed after saving the primary record and before any action Form
* *FormElement.value* = `<string>` - By default, the full path of any already uploaded file is shown. To show something
different, e.g. only the filename, define:
* ``{{filenameBase:V}}`` (see :ref:`STORE_VARS<store_vars_form_element_upload>`)
* ``{{filenameBase:V}}`` (see :ref:STORE_VARS)
* ``{{SELECT SUBSTRING_INDEX( '{{pathFileName:R}}', '/', -1) }}``
See also :ref:`download Button<downloadButton>` to offer a download of an uploaded file.
......@@ -1966,11 +1966,11 @@ FormElement.parameter
such an installation (filesystem and database) are moveable.
* If the original filename should be part of `fileDestination`, the variable *{{filename}}*
(see :ref:`STORE_VARS<store_vars_form_element_upload>`) can be used. Example ::
(see :ref:STORE_VARS) can be used. Example ::
fileDestination={{SELECT 'fileadmin/user/pictures/', p.name, '-{{filename}}' FROM Person AS p WHERE p.id={{id:R0}} }}
* Several more variants of the filename and also mimetype and filesize are available. See :ref:`store variables form element upload<store_vars_form_element_upload>`.
* Several more variants of the filename and also mimetype and filesize are available. See :ref:STORE_VARS.
* The original filename will be sanitized: only '<alnum>', '.' and '_' characters are allowed. German 'umlaut' will
be replaced by 'ae', 'ue', 'oe'. All non valid characters will be replaced by '_'.
......@@ -2028,7 +2028,7 @@ FormElement.parameter
`fe.value`. The button is only shown if `fe.value` points to a readable file on the server.
* If `downloadButton` is empty, just shows the regular download glyph.
* To just show the filename: `downloadButton = t:{{filenameOnly:V}}` (see :ref:`STORE_VARS<store_vars_form_element_upload>`)
* To just show the filename: `downloadButton = t:{{filenameOnly:V}}` (see :ref:STORE_VARS)
* Additional attributes might be given like `downloadButton = t:Download|o:check file|G:0`. Please check :ref:`download`.
* *fileUnzip* - If the file is a ZIP file (only then) it will be unzipped. If no directory is given via ``fileUnzip``, the
......@@ -2132,7 +2132,7 @@ with 'my', e.g. 'myUpload1'.
* *FormElement.parameter*:
* *fileDestination* = `<pathFileName>` - define the path/filename
(see also :ref:` STORE_VARS <store_vars_form_element_upload>`). E.g.::
(see :ref:STORE_VARS). E.g.::
fileDestination=fileadmin/person/{{name:R0}}_{{id:R}}/uploads/picture_{{filename}}
......
......@@ -252,44 +252,42 @@ Store: *VARS* - V
-----------------
* Sanitized: *no*
+-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
| Name | Explanation |
+=========================+============================================================================================================================================+
| random | Random string with length of 32 alphanum chars (lower & upper case). This variable is always filled. Each access gives a new value. |
| | Remember: QFQ variables will be replaced **before** a SQL statement is fired. Uniqueness is given via PHP function *uniqid()*. |
+-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
| slaveId | see :ref:`slave-id` |
+-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
| allRequiredGiven | Form save - Set during check of all required FE. If every *required* FE is given: *1*. Else: *0*. If there is no required FE: *1*. |
| | Even with `formModeGlobal` = `requiredOff` | `requiredOffButMark` the variable will be set. |
+-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
.. _`store_vars_form_element_upload`:
Specific FormElement 'upload'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
| Name | Explanation |
+=========================+============================================================================================================================================+
| filename | Original filename of an uploaded file via an 'upload'-FormElement. Valid only during processing of the current 'upload'-formElement. |
+-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
| filenameOnly | Like filename, but without path. |
+-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
| filenameBase | Like `filename`, but without an optional extension. E.g. filename='image.png' comes to filenameBase='image' |
+-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
| filenameExt | Like `filename`, but only the optional extension. E.g. filename='image.png' comes to filenameExt='png' |
+-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
| fileDestination | Destination (path & filename) for an uploaded file. Defined in an 'upload'-FormElement.parameter. Valid: same as 'filename'. |
+-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
| fileSize | Size of the uploaded file. |
+-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
| mimeType | Mime type of the uploaded file. |
+-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
The directive `fillStoreVar` will fill the store VARS with custom values.::
* The store contains a few specific *QFQ values* and optional *custom* defined values.
QFQ values
^^^^^^^^^^
+-------------------+-------------+--------------------------------------------------------------------------------------------------------------------------------------------+
| Name | Scope | Explanation |
+===================+=============+============================================================================================================================================+
| random | Always | Random string with length of 32 alphanum chars (lower & upper case). This variable is always filled. Each access gives a new value. |
| | | Remember: QFQ variables will be replaced **before** a SQL statement is fired. Uniqueness is given via PHP function *uniqid()*. |
+-------------------+-------------+--------------------------------------------------------------------------------------------------------------------------------------------+
| slaveId | FE *any* | see :ref:`slave-id` |
+-------------------+-------------+--------------------------------------------------------------------------------------------------------------------------------------------+
| allRequiredGiven | Form | Form save - Set during check of all required FE. If every *required* FE is given: *1*. Else: *0*. If there is no required FE: *1*. |
| | | Even with `formModeGlobal` = `requiredOff` | `requiredOffButMark` the variable will be set. |
+-------------------+-------------+--------------------------------------------------------------------------------------------------------------------------------------------+
| filename | FE *upload* | Original filename of an uploaded file via an 'upload'-FormElement. Valid only during processing of the current 'upload'-formElement. |
+-------------------+-------------+--------------------------------------------------------------------------------------------------------------------------------------------+
| filenameOnly | FE *upload* | Like filename, but without path. |
+-------------------+-------------+--------------------------------------------------------------------------------------------------------------------------------------------+
| filenameBase | FE *upload* | Like `filename`, but without an optional extension. E.g. filename='image.png' comes to filenameBase='image' |
+-------------------+-------------+--------------------------------------------------------------------------------------------------------------------------------------------+
| filenameExt | FE *upload* | Like `filename`, but only the optional extension. E.g. filename='image.png' comes to filenameExt='png' |
+-------------------+-------------+--------------------------------------------------------------------------------------------------------------------------------------------+
| fileDestination | FE *upload* | Destination (path & filename) for an uploaded file. Defined in an 'upload'-FormElement.parameter. Valid: same as 'filename'. |
+-------------------+-------------+--------------------------------------------------------------------------------------------------------------------------------------------+
| fileSize | FE *upload* | Size of the uploaded file. |
+-------------------+-------------+--------------------------------------------------------------------------------------------------------------------------------------------+
| mimeType | FE *upload* | Mime type of the uploaded file. |
+-------------------+-------------+--------------------------------------------------------------------------------------------------------------------------------------------+
Custom: fillStoreVar
^^^^^^^^^^^^^^^^^^^^
The directive *Form.parameter.fillStoreVar* and *FormElement.parameter.fillStoreVar* will fill the STORE_VARS with
custom values.::
fillStoreVar = {{! SELECT p.name, p.email FROM Person AS p WHERE p.id={{pId:S}} }}
......@@ -299,6 +297,7 @@ The directive `fillStoreVar` will fill the store VARS with custom values.::
* Already existing variables with different names will be merged.
* Already existing variables with same names will be overwritten.
.. _STORE_LDAP:
Store: *LDAP* - L
......
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