From cfffed4042a51f75fd37ed6fbc328b3f8f3af878 Mon Sep 17 00:00:00 2001 From: Carsten Rose <carsten.rose@math.uzh.ch> Date: Mon, 27 Apr 2020 21:45:01 +0200 Subject: [PATCH] Manual.rst: Reformat/fix broken styles --- Documentation/Manual.rst | 333 ++++++++++++++++++++------------------- 1 file changed, 171 insertions(+), 162 deletions(-) diff --git a/Documentation/Manual.rst b/Documentation/Manual.rst index 97e7129ba..e7930935d 100644 --- a/Documentation/Manual.rst +++ b/Documentation/Manual.rst @@ -1278,8 +1278,8 @@ Some examples, including nesting:: Leading and trailing spaces inside curly braces are removed. - * *{{ SELECT "Hello World" }}* becomes *{{SELECT "Hello World"}}* - * *{{ varname }}* becomes *{{varname}}* +* *{{ SELECT "Hello World" }}* becomes *{{SELECT "Hello World"}}* +* *{{ varname }}* becomes *{{varname}}* Types ----- @@ -1882,11 +1882,17 @@ Store: *CLIENT* - C +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ | 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 | +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + + .. _STORE_TYPO3: Store: *TYPO3* (Bodytext) - T @@ -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}}*. - * Resultset format 'named': column 'label' and optional a column 'id'. - * Resultset format 'index': + * Resultset format 'named': column 'label' and optional a column 'id'. + * Resultset format 'index': - * One column in resultset >> first column represents *label* - * Two or more columns in resultset >> first column represents *id* and second 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*. 2. *FormElement.parameter*: - * *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` + * *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` 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. statements) might be used. * *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 - * 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. * *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 See also `downloadButton`_ to offer a download of an uploaded file. -* *FormElement.parameter*: +FormElement.parameter +""""""""""""""""""""" - * *fileButtonText*: Overwrite default ‘Choose File’ - * *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/*`. +* *fileButtonText*: Overwrite default ‘Choose File’ +* *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/*`. - * *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 - * 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 ``*.*``. - * 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: + * 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. + * To allow any type, specify ``*`` or ``*/*`` or ``*.*``. + * 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: - * 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 'file choose' dialog only offers files of the selected (in the dialog) type. + * 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 '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 - secure**, cause there is no *content* check on the server after the upload. + * 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. - * *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. +* *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. - * *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. +* *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. - * *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` - - such an installation (filesystem and database) are moveable. +* *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. - * 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 - be replaced by 'ae', 'ue', 'oe'. All non valid characters will be replaced by '_'. + * 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 '_'. - * 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 - arise. Check also *fileReplace* below. + * 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 + 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 - one is still '0' at the time of saving. Use `{{id:R0}}` instead. + * 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. - * 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 - execution (even if the file has been uploaded, the webserver won't execute it) - see `SecureDirectFileAccess`_. + * 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 + 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`. - * *slaveId*, *sqlInsert*, *sqlUpdate*, *sqlDelete*, *sqlUpdate*: available only in :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`. - * `fileSize` / `mimeType` +* `fileSize` / `mimeType` - * 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. + * 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. - * If there are more than one Upload FormElement in a form, the automatically update for `fileSize` and/or `mimeType` - are not done automatically. + * If there are more than one Upload FormElement in a form, the automatically update for `fileSize` and/or `mimeType` + 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. - * *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. +* *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 + 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, - 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. - 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 - process does not solve all orientation problems. +* *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 + 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 + 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. - * *autoOrient* = [0|1] - * *autoOrientCmd* = 'convert -auto-orient {{fileDestination:V}} {{fileDestination:V}}.new; mv {{fileDestination:V}}.new {{fileDestination:V}}' - * *autoOrientMimeType* = image/jpeg,image/png,image/tiff + * *autoOrient* = [0|1] + * *autoOrientCmd* = 'convert -auto-orient {{fileDestination:V}} {{fileDestination:V}}.new; mv {{fileDestination:V}}.new {{fileDestination:V}}' + * *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* = `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. - - * If `downloadButton` is empty, just shows the regular download glyph. - * To just show the filename: `downloadButton = t:{{filenameOnly:V}}` - * 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` - - * fileSplit, fileDestinationSplit, tableNameSplit: see split-pdf-upload_ - - * 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`. - 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: - `DATE_ADD('1899-12-30', INTERVAL serialValue DAY)`. - - * *importToTable* = <[db.]tablename> - **Required**. Providing this parameter activates the import. If the table - doesn't exist, it will be created. - * *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. - * *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 - 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. - * *importType* = `auto` (default) | `xls` | `xlsx` | `ods` | `csv` - Define what kind of data should be expected by the - Spreadsheet Reader. - * *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 - usage. - * *importSetReadDataOnly* = 0|1. Read only cell data, not the cell formatting. Warning: cell types other than numerical - will be misinterpreted. - * *importListSheetNames* = 0|1. For debug use only. Will open a dialog and report all found worksheet names. +* *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. + + * If `downloadButton` is empty, just shows the regular download glyph. + * To just show the filename: `downloadButton = t:{{filenameOnly:V}}` + * 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` + +* fileSplit, fileDestinationSplit, tableNameSplit: see split-pdf-upload_ + +* 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`. + 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: + `DATE_ADD('1899-12-30', INTERVAL serialValue DAY)`. + + * *importToTable* = <[db.]tablename> - **Required**. Providing this parameter activates the import. If the table + doesn't exist, it will be created. + * *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. + * *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 + 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. + * *importType* = `auto` (default) | `xls` | `xlsx` | `ods` | `csv` - Define what kind of data should be expected by the + Spreadsheet Reader. + * *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 + usage. + * *importSetReadDataOnly* = 0|1. Read only cell data, not the cell formatting. Warning: cell types other than numerical + will be misinterpreted. + * *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 @@ -4376,17 +4383,17 @@ These type of 'action' *FormElements* will be used to implement data validation Types: - * beforeLoad (e.g. good to check access permission) - * afterLoad - * beforeSave (e.g. to prohibit creating of duplicate records) - * afterSave (e.g. to to create & update additional records) - * beforeInsert - * afterInsert - * beforeUpdate - * afterUpdate - * beforeDelete (e.g. to delete slave records) - * afterDelete - * paste (configure copy/paste forms) +* beforeLoad (e.g. good to check access permission) +* afterLoad +* beforeSave (e.g. to prohibit creating of duplicate records) +* afterSave (e.g. to to create & update additional records) +* beforeInsert +* afterInsert +* beforeUpdate +* afterUpdate +* beforeDelete (e.g. to delete slave records) +* afterDelete +* paste (configure copy/paste forms) .. _sqlValidate: @@ -4395,49 +4402,50 @@ Parameter: sqlValidate 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*. - * 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. +* 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 + `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 - (!=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. +* *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, + 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}}` - * Separate multiple valid record numbers by ','. If at least one of those matches, the check will pass successfully. + * *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. - * *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: 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). - *slaveId* will be automatically filled with the value of the named column. + * 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. - * 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: - * `{{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 - recent slaveId - * After an INSERT the `last_insert_id()` becomes the *{{slaveId:V}}*. - * `fillStoreVar` is fired first, than `slaveId`. - * If `slaveId` is known in `fillStoreVar`, set: `slaveId={{someId:V}}`. +* `{{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 + recent slaveId +* After an INSERT the `last_insert_id()` becomes the *{{slaveId:V}}*. +* `fillStoreVar` is fired first, than `slaveId`. +* If `slaveId` is known in `fillStoreVar`, set: `slaveId={{someId:V}}`. @@ -4447,27 +4455,28 @@ Parameter: sqlBefore / sqlInsert / sqlUpdate / sqlDelete / sqlAfter * 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. -*FormElement.parameter*: +FormElement.parameter +;;;;;;;;;;;;;;;;;;;;; - * *requiredList* = `<fe.name[s]>` - List of `native`-*FormElement*: only if all of those elements are filled, the current - `action`-*FormElement* will be processed. +* *requiredList* = `<fe.name[s]>` - List of `native`-*FormElement*: only if all of those elements are filled, the current + `action`-*FormElement* will be processed. - * *sqlBefore* = `{{<query>}}` - always fired (before any *sqlInsert*, *sqlUpdate*, ..) - * *sqlInsert* = `{{<query>}}` - fired if *slaveId* == `0` or *slaveId* == `''`. - * *sqlUpdate* = `{{<query>}}` - fired if *slaveId* > `0`. - * *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. - * *sqlAfter* = `{{<query>}}` - always fired (after *sqlInsert*, *sqlUpdate* or *sqlDelete*). - * *sqlHonorFormElements* = `<fe.name[s]>` list of *FormElement* names (this parameter is optional). +* *sqlBefore* = `{{<query>}}` - always fired (before any *sqlInsert*, *sqlUpdate*, ..) +* *sqlInsert* = `{{<query>}}` - fired if *slaveId* == `0` or *slaveId* == `''`. +* *sqlUpdate* = `{{<query>}}` - fired if *slaveId* > `0`. +* *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. +* *sqlAfter* = `{{<query>}}` - always fired (after *sqlInsert*, *sqlUpdate* or *sqlDelete*). +* *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 *sqlUpdate* if *slaveId* > `0` + * fire *sqlInsert* 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 @@ -7361,16 +7370,16 @@ Parameter and (element) sources * *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 - is allowed per download link (no concatenation). + * 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). - * 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 - get generic filenames inside the archive. - * If not specified, the **default** 'Mode' depends on the number of specified element sources (=file or web page): + * 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 + 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 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 only one `file` is specified, the default is `file`. + * 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. Any combination and order of these options are allowed. -- GitLab