Skip to content
Snippets Groups Projects
Commit cfffed40 authored by Carsten  Rose's avatar Carsten Rose
Browse files

Manual.rst: Reformat/fix broken styles

parent 284a9edc
No related branches found
No related tags found
1 merge request!265Develop
Pipeline #3456 passed
...@@ -1278,8 +1278,8 @@ Some examples, including nesting:: ...@@ -1278,8 +1278,8 @@ Some examples, including nesting::
   
Leading and trailing spaces inside curly braces are removed. Leading and trailing spaces inside curly braces are removed.
   
* *{{ SELECT "Hello World" }}* becomes *{{SELECT "Hello World"}}* * *{{ SELECT "Hello World" }}* becomes *{{SELECT "Hello World"}}*
* *{{ varname }}* becomes *{{varname}}* * *{{ varname }}* becomes *{{varname}}*
   
Types Types
----- -----
...@@ -1882,11 +1882,17 @@ Store: *CLIENT* - C ...@@ -1882,11 +1882,17 @@ Store: *CLIENT* - C
+-------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
| REMOTE_ADDR | Client IP address | | REMOTE_ADDR | Client IP address |
+-------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
| '$_SERVER[*]' | All other variables accessible by *$_SERVER[]*. Only the often used have a pre-defined sanitize class. | | All HTTP Header | SERVER_ADDR, SERVER_NAME, SERVER_SOFTWARE,SERVER_PROTOCOL, REQUEST_METHOD, REQUEST_TIME, REQUEST_TIME_FLOAT, QUERY_STRING, DOCUMENT_ROOT,|
| variables | HTTP_ACCEPT, HTTP_ACCEPT_CHARSET, HTTP_ACCEPT_ENCODING, HTTP_ACCEPT_LANGUAGE, HTTP_CONNECTION, HTTP_HOST, HTTP_REFERER, |
| | HTTP_USER_AGENT, HTTPS, REMOTE_ADDR, REMOTE_HOST, REMOTE_PORT, REMOTE_USER, REDIRECT_REMOTE_USER, SCRIPT_FILENAME, SERVER_ADMIN, |
| | SERVER_PORT, SERVER_SIGNATURE, PATH_TRANSLATED, SCRIPT_NAME, REQUEST_URI, PHP_AUTH_DIGEST, PHP_AUTH_USER, PHP_AUTH_PW, |
| | AUTH_TYPE, PATH_INFO, ORIG_PATH_INFO |
+-------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
| Authorization | Value of the HTTP Header 'Authorization'. This is typically not set. Mostly used for authentication of REST requests | | Authorization | Value of the HTTP Header 'Authorization'. This is typically not set. Mostly used for authentication of REST requests |
+-------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
   
.. _STORE_TYPO3: .. _STORE_TYPO3:
   
Store: *TYPO3* (Bodytext) - T Store: *TYPO3* (Bodytext) - T
...@@ -3839,16 +3845,16 @@ Type: radio ...@@ -3839,16 +3845,16 @@ Type: radio
   
1. 'sql1': E.g. *{{!SELECT type AS label FROM Car }}* or *{{!SELECT type AS label, typeNr AS id FROM Car}}* or *{{!SHOW tables}}*. 1. 'sql1': E.g. *{{!SELECT type AS label FROM Car }}* or *{{!SELECT type AS label, typeNr AS id FROM Car}}* or *{{!SHOW tables}}*.
   
* Resultset format 'named': column 'label' and optional a column 'id'. * Resultset format 'named': column 'label' and optional a column 'id'.
* Resultset format 'index': * Resultset format 'index':
   
* One column in resultset >> first column represents *label* * One column in resultset >> first column represents *label*
* Two or more columns in resultset >> first column represents *id* and second column represents *label*. * Two or more columns in resultset >> first column represents *id* and second column represents *label*.
   
2. *FormElement.parameter*: 2. *FormElement.parameter*:
   
* *itemList* = `<attribute>` E.g.: *itemList=red,blue,orange* or *itemList=1:red,2:blue,3:orange* * *itemList* = `<attribute>` E.g.: *itemList=red,blue,orange* or *itemList=1:red,2:blue,3:orange*
* If ':' or ',' are part of key or value, it needs to escaped by \\ . E.g.: `itemList=1:red\\: (with colon),2:blue\\, (with comma),3:orange` * If ':' or ',' are part of key or value, it needs to escaped by \\ . E.g.: `itemList=1:red\\: (with colon),2:blue\\, (with comma),3:orange`
   
3. Definition of the *enum* or *set* field (only labels, ids are not possible). 3. Definition of the *enum* or *set* field (only labels, ids are not possible).
   
...@@ -4018,13 +4024,13 @@ will be rendered inside the form as a HTML table. ...@@ -4018,13 +4024,13 @@ will be rendered inside the form as a HTML table.
statements) might be used. statements) might be used.
   
* *subrecordTableClass*: Optional. Default: 'table table-hover qfq-subrecord-table qfq-color-grey-2'. If given, the default will be * *subrecordTableClass*: Optional. Default: 'table table-hover qfq-subrecord-table qfq-color-grey-2'. If given, the default will be
overwritten. Example: :: overwritten. Example::
   
subrecordTableClass = table table-hover qfq-subrecord-table qfq-table-50 subrecordTableClass = table table-hover qfq-subrecord-table qfq-table-50
   
* Tablesorter in Subrecord: * Tablesorter in Subrecord::
   
subrecordTableClass = table table-hover qfq-subrecord-table tablesorter tablesorter-pager tablesorter-filter subrecordTableClass = table table-hover qfq-subrecord-table tablesorter tablesorter-pager tablesorter-filter
   
* *subrecordColumnTitleEdit*: Optional. Will be rendered as the column title for the new/edit column. * *subrecordColumnTitleEdit*: Optional. Will be rendered as the column title for the new/edit column.
* *subrecordColumnTitleDelete*: Optional. Will be rendered as the column title for the delete column. * *subrecordColumnTitleDelete*: Optional. Will be rendered as the column title for the delete column.
...@@ -4104,129 +4110,130 @@ and will be processed after saving the primary record and before any action Form ...@@ -4104,129 +4110,130 @@ and will be processed after saving the primary record and before any action Form
   
See also `downloadButton`_ to offer a download of an uploaded file. See also `downloadButton`_ to offer a download of an uploaded file.
   
* *FormElement.parameter*: FormElement.parameter
"""""""""""""""""""""
   
* *fileButtonText*: Overwrite default ‘Choose File’ * *fileButtonText*: Overwrite default ‘Choose File’
* *capture* = `camera` - On a smartphone, after pressing the 'open file' button, the camera will be opened and a * *capture* = `camera` - On a smartphone, after pressing the 'open file' button, the camera will be opened and a
choosen picture will be uploaded. Automatically set/overwrite `accept=image/*`. choosen picture will be uploaded. Automatically set/overwrite `accept=image/*`.
   
* *accept* = `<mime type>,image/*,video/*,audio/*,.doc,.docx,.pdf` * *accept* = `<mime type>,image/*,video/*,audio/*,.doc,.docx,.pdf`
   
* List of mime types (also known as 'media types'): http://www.iana.org/assignments/media-types/media-types.xhtml * List of mime types (also known as 'media types'): http://www.iana.org/assignments/media-types/media-types.xhtml
* If none mime type is specified, 'application/pdf' is set. This forces that always (!) one type is specified. * If none mime type is specified, 'application/pdf' is set. This forces that always (!) one type is specified.
* To allow any type, specify ``*`` or ``*/*`` or ``*.*``. * To allow any type, specify ``*`` or ``*/*`` or ``*.*``.
* One or more media types might be specified, separated by ','. * One or more media types might be specified, separated by ','.
* Different browser respect the given definitions in different ways. Typically the 'file choose' dialog offer: * Different browser respect the given definitions in different ways. Typically the 'file choose' dialog offer:
   
* the specified mime type (some browers only show 'custom', if more than one mime type is given), * the specified mime type (some browers only show 'custom', if more than one mime type is given),
* the option 'All files' (the user is always free to **try** to upload other file types) - but the server won't accept them, * the option 'All files' (the user is always free to **try** to upload other file types) - but the server won't accept them,
* the 'file choose' dialog only offers files of the selected (in the dialog) type. * the 'file choose' dialog only offers files of the selected (in the dialog) type.
   
* If for a specific file type is no mime type available, the definition of file extension(s) is possible. This is **less * If for a specific file type is no mime type available, the definition of file extension(s) is possible. This is **less
secure**, cause there is no *content* check on the server after the upload. secure**, cause there is no *content* check on the server after the upload.
   
* *maxFileSize* = `<size>` - max filesize in bytes (no unit), kilobytes (k/K) or megabytes (m/M) for an uploaded file. * *maxFileSize* = `<size>` - max filesize in bytes (no unit), kilobytes (k/K) or megabytes (m/M) for an uploaded file.
If empty or not given, take value from Form, System or System default. If empty or not given, take value from Form, System or System default.
   
* *fileTrash* = [0|1] - Default: '1'. This option en-/disables the trash button right beside the file chooser. By default * *fileTrash* = [0|1] - Default: '1'. This option en-/disables the trash button right beside the file chooser. By default
the trash is visible. The trash is only visible if a) there is already a file uploaded or b) a new file has been chosen. the trash is visible. The trash is only visible if a) there is already a file uploaded or b) a new file has been chosen.
   
* *fileTrashText* = `<string>` - Default: ''. Will be shown right beside the trash glyph-icon. * *fileTrashText* = `<string>` - Default: ''. Will be shown right beside the trash glyph-icon.
   
* *fileDestination* = `<pathFileName>` - Destination where to copy the file. A good practice is to specify a relative `fileDestination` - * *fileDestination* = `<pathFileName>` - Destination where to copy the file. A good practice is to specify a relative `fileDestination` -
such an installation (filesystem and database) are moveable. such an installation (filesystem and database) are moveable.
   
* If the original filename should be part of `fileDestination`, the variable *{{filename}}* (STORE_VARS) can be used. Example :: * If the original filename should be part of `fileDestination`, the variable *{{filename}}* (STORE_VARS) can be used. Example ::
   
fileDestination={{SELECT 'fileadmin/user/pictures/', p.name, '-{{filename}}' FROM Person AS p WHERE p.id={{id:R0}} }} 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 `store_vars_form_element_upload`_. * Several more variants of the filename and also mimetype and filesize are available. See `store_vars_form_element_upload`_.
   
* The original filename will be sanitized: only '<alnum>', '.' and '_' characters are allowed. German 'umlaut' will * 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 '_'. be replaced by 'ae', 'ue', 'oe'. All non valid characters will be replaced by '_'.
   
* If a file already exist under `fileDestination`, an error message is shown and 'save' is aborted. The user has no * If a file already exist under `fileDestination`, an error message is shown and 'save' is aborted. The user has no
possibility to overwrite the already existing file. If the whole workflow is correct, this situation should no possibility to overwrite the already existing file. If the whole workflow is correct, this situation should no
arise. Check also *fileReplace* below. arise. Check also *fileReplace* below.
   
* All necessary subdirectories in `fileDestination` are automatically created. * All necessary subdirectories in `fileDestination` are automatically created.
   
* Using the current record id in the `fileDestination`: Using {{r}} is problematic for a 'new' primary record: that * Using the current record id in the `fileDestination`: Using {{r}} is problematic for a 'new' primary record: that
one is still '0' at the time of saving. Use `{{id:R0}}` instead. one is still '0' at the time of saving. Use `{{id:R0}}` instead.
   
* Uploading of malicious code (e.g. PHP files) is hard to detect. The default mime type check can be easily faked * Uploading of malicious code (e.g. PHP files) is hard to detect. The default mime type check can be easily faked
by an attacker. Therefore it's recommended to use a `fileDestination`-directory, which is secured against script by an attacker. Therefore it's recommended to use a `fileDestination`-directory, which is secured against script
execution (even if the file has been uploaded, the webserver won't execute it) - see `SecureDirectFileAccess`_. execution (even if the file has been uploaded, the webserver won't execute it) - see `SecureDirectFileAccess`_.
   
* *sqlBefore*, *sqlAfter*: available in :ref:`Upload simple mode` and :ref:`Upload advanced mode`. * *sqlBefore*, *sqlAfter*: available in :ref:`Upload simple mode` and :ref:`Upload advanced mode`.
* *slaveId*, *sqlInsert*, *sqlUpdate*, *sqlDelete*, *sqlUpdate*: available only in :ref:`Upload advanced mode`. * *slaveId*, *sqlInsert*, *sqlUpdate*, *sqlDelete*, *sqlUpdate*: available only in :ref:`Upload advanced mode`.
   
* `fileSize` / `mimeType` * `fileSize` / `mimeType`
   
* In :ref:`Upload simple mode` the information of `fileSize` and `mimeType` will be automatically updated on the current * In :ref:`Upload simple mode` the information of `fileSize` and `mimeType` will be automatically updated on the current
record, if table columns `fileSize` and/or `mimeType` exist. record, if table columns `fileSize` and/or `mimeType` exist.
   
* If there are more than one Upload FormElement in a form, the automatically update for `fileSize` and/or `mimeType` * If there are more than one Upload FormElement in a form, the automatically update for `fileSize` and/or `mimeType`
are not done automatically. are not done automatically.
   
* In :ref:`Upload advanced mode` the `fileSize` and / or `mimeType` have to be updated with an explicit SQL statement:: * In :ref:`Upload advanced mode` the `fileSize` and / or `mimeType` have to be updated with an explicit SQL statement::
   
sqlAfter = {{UPDATE Data SET mimeType='{{mimeType:V}}', fileSize={{fileSize:V}} WHERE id={{id:R}} }} sqlAfter = {{UPDATE Data SET mimeType='{{mimeType:V}}', fileSize={{fileSize:V}} WHERE id={{id:R}} }}
   
* *fileReplace* = `always` - If `fileDestination` exist - replace it by the new one. * *fileReplace* = `always` - If `fileDestination` exist - replace it by the new one.
   
* *chmodFile* = <unix file permission mode> - e.g. `660` for owner and group read and writeable. Only the numeric mode is allowed. * *chmodFile* = <unix file permission mode> - e.g. `660` for owner and group read and writeable. Only the numeric mode is allowed.
* *chmodDir* = <unix file permission mode> - e.g. `770` for owner and group read, writeable and executable. Only the * *chmodDir* = <unix file permission mode> - e.g. `770` for owner and group read, writeable and executable. Only the
numeric mode is allowed. Will be applied to all new created directories. numeric mode is allowed. Will be applied to all new created directories.
   
* *autoOrient:* images might contain EXIF data (e.g. captured via mobile phones) incl. an orientation tag like TopLeft, * *autoOrient:* images might contain EXIF data (e.g. captured via mobile phones) incl. an orientation tag like TopLeft,
BottomRight and so on. Web-Browser and other grafic programs often understand and respect those information and rotate BottomRight and so on. Web-Browser and other grafic programs often understand and respect those information and rotate
such images automatically. If not, the image might be displayed in an unwanted oritentation. such images automatically. If not, the image might be displayed in an unwanted oritentation.
With active option 'autoOrient', QFQ tries to normalize such images via 'convert' (part of ImageMagick). Especially With active option 'autoOrient', QFQ tries to normalize such images via 'convert' (part of ImageMagick). Especially
if images are processed by the QFQ internal 'Fabric'-JS it's recommended to normalize images first. The normalization if images are processed by the QFQ internal 'Fabric'-JS it's recommended to normalize images first. The normalization
process does not solve all orientation problems. process does not solve all orientation problems.
   
* *autoOrient* = [0|1] * *autoOrient* = [0|1]
* *autoOrientCmd* = 'convert -auto-orient {{fileDestination:V}} {{fileDestination:V}}.new; mv {{fileDestination:V}}.new {{fileDestination:V}}' * *autoOrientCmd* = 'convert -auto-orient {{fileDestination:V}} {{fileDestination:V}}.new; mv {{fileDestination:V}}.new {{fileDestination:V}}'
* *autoOrientMimeType* = image/jpeg,image/png,image/tiff * *autoOrientMimeType* = image/jpeg,image/png,image/tiff
   
If the defaults for `autoOrientCmd` and `autoOrientMimeType` are sufficient, it's not necessary to specify them. If the defaults for `autoOrientCmd` and `autoOrientMimeType` are sufficient, it's not necessary to specify them.
   
.. _`downloadButton`: .. _`downloadButton`:
   
* *downloadButton* = `t:<string>` - If given, shows a button to download the previous uploaded file - instead of the string given in * *downloadButton* = `t:<string>` - If given, shows a button to download the previous uploaded file - instead of the string given in
`fe.value`. The button is only shown if `fe.value` points to a readable file on the server. `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. * If `downloadButton` is empty, just shows the regular download glyph.
* To just show the filename: `downloadButton = t:{{filenameOnly:V}}` * To just show the filename: `downloadButton = t:{{filenameOnly:V}}`
* Additional attributes might be given like `downloadButton = t:Download|o:check file`. Please check `download`_. * Additional attributes might be given like `downloadButton = t:Download|o:check file`. Please check `download`_.
* The following attributes are hard coded (can't be changed): `s|M:file|d|F` * The following attributes are hard coded (can't be changed): `s|M:file|d|F`
* fileSplit, fileDestinationSplit, tableNameSplit: see split-pdf-upload_ * fileSplit, fileDestinationSplit, tableNameSplit: see split-pdf-upload_
* Excel Import: QFQ offers functionality to directly import excel data into the database. This functionality can * Excel Import: QFQ offers functionality to directly import excel data into the database. This functionality can
optionally be combined with saving the file by using the above parameters like `fileDestination`. optionally be combined with saving the file by using the above parameters like `fileDestination`.
The data is imported without formatting. Please note that this means Excel dates will be imported as a number The data is imported without formatting. Please note that this means Excel dates will be imported as a number
(e.g. 43214), which is the serial value date in Excel. To convert such a number to a MariaDb date, use: (e.g. 43214), which is the serial value date in Excel. To convert such a number to a MariaDb date, use:
`DATE_ADD('1899-12-30', INTERVAL serialValue DAY)`. `DATE_ADD('1899-12-30', INTERVAL serialValue DAY)`.
* *importToTable* = <[db.]tablename> - **Required**. Providing this parameter activates the import. If the table * *importToTable* = <[db.]tablename> - **Required**. Providing this parameter activates the import. If the table
doesn't exist, it will be created. doesn't exist, it will be created.
* *importToColumns* = <col1>,<col2>,... - If none provided, the Excel column names A, B, ... are used. Note: These * *importToColumns* = <col1>,<col2>,... - If none provided, the Excel column names A, B, ... are used. Note: These
have to match the table's column names if the table already exists. have to match the table's column names if the table already exists.
* *importRegion* = [tab],[startColumn],[startRow],[endColumn],[endRow]|... - All parts are optional (default: * *importRegion* = [tab],[startColumn],[startRow],[endColumn],[endRow]|... - All parts are optional (default:
entire 1st sheet). Tab can either be given as an index (1-based) or a name. start/endColumn can be given either entire 1st sheet). Tab can either be given as an index (1-based) or a name. start/endColumn can be given either
numerically (1, 2, ...) or by column name (A, B, ...). Note that you can specify several regions to import. numerically (1, 2, ...) or by column name (A, B, ...). Note that you can specify several regions to import.
* *importMode* = `append` (default) | `replace` - The data is either appended or replace in the specified table. * *importMode* = `append` (default) | `replace` - The data is either appended or replace in the specified table.
* *importType* = `auto` (default) | `xls` | `xlsx` | `ods` | `csv` - Define what kind of data should be expected by the * *importType* = `auto` (default) | `xls` | `xlsx` | `ods` | `csv` - Define what kind of data should be expected by the
Spreadsheet Reader. Spreadsheet Reader.
* *importNamedSheetsOnly* = <comma separated list of sheet names>. Use this option if specific sheets cause problems * *importNamedSheetsOnly* = <comma separated list of sheet names>. Use this option if specific sheets cause problems
during import and should be skipped, by naming only those sheets, who will be read. This will also reduce the memory during import and should be skipped, by naming only those sheets, who will be read. This will also reduce the memory
usage. usage.
* *importSetReadDataOnly* = 0|1. Read only cell data, not the cell formatting. Warning: cell types other than numerical * *importSetReadDataOnly* = 0|1. Read only cell data, not the cell formatting. Warning: cell types other than numerical
will be misinterpreted. will be misinterpreted.
* *importListSheetNames* = 0|1. For debug use only. Will open a dialog and report all found worksheet names. * *importListSheetNames* = 0|1. For debug use only. Will open a dialog and report all found worksheet names.
   
   
Immediately after the upload finished (before the user press save), the file will be checked on the server for it's Immediately after the upload finished (before the user press save), the file will be checked on the server for it's
...@@ -4376,17 +4383,17 @@ These type of 'action' *FormElements* will be used to implement data validation ...@@ -4376,17 +4383,17 @@ These type of 'action' *FormElements* will be used to implement data validation
   
Types: Types:
   
* beforeLoad (e.g. good to check access permission) * beforeLoad (e.g. good to check access permission)
* afterLoad * afterLoad
* beforeSave (e.g. to prohibit creating of duplicate records) * beforeSave (e.g. to prohibit creating of duplicate records)
* afterSave (e.g. to to create & update additional records) * afterSave (e.g. to to create & update additional records)
* beforeInsert * beforeInsert
* afterInsert * afterInsert
* beforeUpdate * beforeUpdate
* afterUpdate * afterUpdate
* beforeDelete (e.g. to delete slave records) * beforeDelete (e.g. to delete slave records)
* afterDelete * afterDelete
* paste (configure copy/paste forms) * paste (configure copy/paste forms)
   
.. _sqlValidate: .. _sqlValidate:
   
...@@ -4395,49 +4402,50 @@ Parameter: sqlValidate ...@@ -4395,49 +4402,50 @@ Parameter: sqlValidate
   
Perform checks by firing an SQL query and expecting a predefined number of selected records. Perform checks by firing an SQL query and expecting a predefined number of selected records.
   
* OK: the `expectRecords` number of records has been selected. Continue processing the next *FormElement*. * OK: the `expectRecords` number of records has been selected. Continue processing the next *FormElement*.
* Fail: the `expectRecords` number of records has not been selected (less or more): Display the error message * Fail: the `expectRecords` number of records has not been selected (less or more): Display the error message
`messageFail` and abort the whole (!) current form load or save. `messageFail` and abort the whole (!) current form load or save.
   
*FormElement.parameter*: *FormElement.parameter*:
   
* *requiredList* = `<fe.name[s]>` - List of `native`-*FormElement* names: only if all of those elements are filled * *requiredList* = `<fe.name[s]>` - List of `native`-*FormElement* names: only if all of those elements are filled
(!=0 and !=''), the *current* `action`-*FormElement* will be processed. This will enable or disable the check, (!=0 and !=''), the *current* `action`-*FormElement* will be processed. This will enable or disable the check,
based on the user input! If no `native`-*FormElement* names are given, the specified check will always be performed. based on the user input! If no `native`-*FormElement* names are given, the specified check will always be performed.
   
* *sqlValidate* = `{{<query>}}` - validation query. E.g.: `sqlValidate={{SELECT id FROM Person AS p WHERE p.name LIKE {{name:F:all}} AND p.firstname LIKE {{firstname:F:all}} }}` * *sqlValidate* = `{{<query>}}` - validation query. E.g.: `sqlValidate={{SELECT id FROM Person AS p WHERE p.name LIKE {{name:F:all}} AND p.firstname LIKE {{firstname:F:all}} }}`
   
* *expectRecords* = `<value>`- number of expected records. * *expectRecords* = `<value>`- number of expected records.
   
* *expectRecords* = `0` or *expectRecords* = `0,1` or *expectRecords* = `{{SELECT COUNT(id) FROM Person}}` * *expectRecords* = `0` or *expectRecords* = `0,1` or *expectRecords* = `{{SELECT COUNT(id) FROM Person}}`
* Separate multiple valid record numbers by ','. If at least one of those matches, the check will pass successfully. * Separate multiple valid record numbers by ','. If at least one of those matches, the check will pass successfully.
   
* *messageFail* = `<string>` - Message to show. E.g.: *messageFail* = `There is already a person called {{firstname:F:all}} {{name:F:all}}` * *messageFail* = `<string>` - Message to show. E.g.: *messageFail* = `There is already a person called {{firstname:F:all}} {{name:F:all}}`
   
.. _slave-id: .. _slave-id:
   
Parameter: slaveId Parameter: slaveId
"""""""""""""""""" """"""""""""""""""
   
*FormElement.parameter*: FormElement.parameter
;;;;;;;;;;;;;;;;;;;;;
   
* *slaveId* = `<id>`: * *slaveId* = `<id>`:
   
* Auto fill: name the action `action`-*FormElement* equal to an existing column (table from the current form definition). * Auto fill: name the action `action`-*FormElement* equal to an existing column (table from the current form definition).
*slaveId* will be automatically filled with the value of the named column. *slaveId* will be automatically filled with the value of the named column.
   
* If there is no such named column name, set *slaveId* = `0`. * If there is no such named column name, set *slaveId* = `0`.
   
* Explicit definition: *slaveId* = `123` or *slaveId* = `{{SELECT id ...}}` * Explicit definition: *slaveId* = `123` or *slaveId* = `{{SELECT id ...}}`
   
Note: Note:
   
* `{{slaveId:V}}` can be used in any query of the current *FormElement*. * `{{slaveId:V}}` can be used in any query of the current *FormElement*.
* If the `action`-*FormElement* name exist as a column in the master record: Update that column *automatically* with the * If the `action`-*FormElement* name exist as a column in the master record: Update that column *automatically* with the
recent slaveId recent slaveId
* After an INSERT the `last_insert_id()` becomes the *{{slaveId:V}}*. * After an INSERT the `last_insert_id()` becomes the *{{slaveId:V}}*.
* `fillStoreVar` is fired first, than `slaveId`. * `fillStoreVar` is fired first, than `slaveId`.
* If `slaveId` is known in `fillStoreVar`, set: `slaveId={{someId:V}}`. * If `slaveId` is known in `fillStoreVar`, set: `slaveId={{someId:V}}`.
   
   
   
...@@ -4447,27 +4455,28 @@ Parameter: sqlBefore / sqlInsert / sqlUpdate / sqlDelete / sqlAfter ...@@ -4447,27 +4455,28 @@ Parameter: sqlBefore / sqlInsert / sqlUpdate / sqlDelete / sqlAfter
* Save values of a form to different record(s), optionally on different table(s). * Save values of a form to different record(s), optionally on different table(s).
* Typically useful on 'afterSave' - be careful when using it earlier, e.g. beforeLoad. * Typically useful on 'afterSave' - be careful when using it earlier, e.g. beforeLoad.
   
*FormElement.parameter*: FormElement.parameter
;;;;;;;;;;;;;;;;;;;;;
   
* *requiredList* = `<fe.name[s]>` - List of `native`-*FormElement*: only if all of those elements are filled, the current * *requiredList* = `<fe.name[s]>` - List of `native`-*FormElement*: only if all of those elements are filled, the current
`action`-*FormElement* will be processed. `action`-*FormElement* will be processed.
   
* *sqlBefore* = `{{<query>}}` - always fired (before any *sqlInsert*, *sqlUpdate*, ..) * *sqlBefore* = `{{<query>}}` - always fired (before any *sqlInsert*, *sqlUpdate*, ..)
* *sqlInsert* = `{{<query>}}` - fired if *slaveId* == `0` or *slaveId* == `''`. * *sqlInsert* = `{{<query>}}` - fired if *slaveId* == `0` or *slaveId* == `''`.
* *sqlUpdate* = `{{<query>}}` - fired if *slaveId* > `0`. * *sqlUpdate* = `{{<query>}}` - fired if *slaveId* > `0`.
* *sqlDelete* = `{{<query>}}` - fired if *slaveId* > `0`, after *sqlInsert* or *sqlUpdate*. Be careful not to delete filled records! * *sqlDelete* = `{{<query>}}` - fired if *slaveId* > `0`, after *sqlInsert* or *sqlUpdate*. Be careful not to delete filled records!
Always add a check, if values given, not to delete the record! *sqlHonorFormElements* helps to skip such checks. Always add a check, if values given, not to delete the record! *sqlHonorFormElements* helps to skip such checks.
* *sqlAfter* = `{{<query>}}` - always fired (after *sqlInsert*, *sqlUpdate* or *sqlDelete*). * *sqlAfter* = `{{<query>}}` - always fired (after *sqlInsert*, *sqlUpdate* or *sqlDelete*).
* *sqlHonorFormElements* = `<fe.name[s]>` list of *FormElement* names (this parameter is optional). * *sqlHonorFormElements* = `<fe.name[s]>` list of *FormElement* names (this parameter is optional).
   
* If one of the named *FormElements* is not empty: * If one of the named *FormElements* is not empty:
   
* fire *sqlInsert* if *slaveId* == `0`, * fire *sqlInsert* if *slaveId* == `0`,
* fire *sqlUpdate* if *slaveId* > `0` * fire *sqlUpdate* if *slaveId* > `0`
   
* If all of the named *FormElements* are empty: * If all of the named *FormElements* are empty:
   
* fire *sqlDelete* if *slaveId* > `0` * fire *sqlDelete* if *slaveId* > `0`
   
   
Example Example
...@@ -7361,16 +7370,16 @@ Parameter and (element) sources ...@@ -7361,16 +7370,16 @@ Parameter and (element) sources
   
* *mode* = <file | pdf | zip | excel> * *mode* = <file | pdf | zip | excel>
   
* If `M:file`, the mime type is derived dynamically from the specified file. In this mode, only one element source * If `M:file`, the mime type is derived dynamically from the specified file. In this mode, only one element source
is allowed per download link (no concatenation). is allowed per download link (no concatenation).
   
* In case of multiple element sources, only `pdf`, `zip` and `excel` (template mode) is supported. * In case of multiple element sources, only `pdf`, `zip` and `excel` (template mode) is supported.
* If `M:zip` is used together with `p:...`, `U:...` or `u:..`, those HTML pages will be converted to PDF. Those files * If `M:zip` is used together with `p:...`, `U:...` or `u:..`, those HTML pages will be converted to PDF. Those files
get generic filenames inside the archive. get generic filenames inside the archive.
* If not specified, the **default** 'Mode' depends on the number of specified element sources (=file or web page): * If not specified, the **default** 'Mode' depends on the number of specified element sources (=file or web page):
   
* If only one `file` is specified, the default is `file`. * If only one `file` is specified, the default is `file`.
* If there is a) a page defined or b) multiple elements, the default is `pdf`. * If there is a) a page defined or b) multiple elements, the default is `pdf`.
   
* *element sources* - for `M:pdf` or `M:zip`, all of the following element sources may be specified multiple times. * *element sources* - for `M:pdf` or `M:zip`, all of the following element sources may be specified multiple times.
Any combination and order of these options are allowed. Any combination and order of these options are allowed.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment