.. ================================================== .. Header hierarchy .. == .. -- .. ^^ .. "" .. ;; .. ,, .. .. --------------------------------------------used to the update the records specified ------ .. Best Practice T3 reST: https://docs.typo3.org/m/typo3/docs-how-to-document/master/en-us/WritingReST/CheatSheet.html .. Reference: https://docs.typo3.org/m/typo3/docs-how-to-document/master/en-us/WritingReST/Index.html .. Italic *italic* .. Bold **bold** .. Code ``text`` .. External Links: `Bootstrap `__ .. Internal Link: :ref:`downloadButton` (default url text) or :ref:`Download Button` (explicit url text) .. Anker for internal link: .. _`download`: .. Add Image: .. image:: ./Images/a4.jpg .. .. Add image with caption: .. figure:: ./Images/black_dot.png .. :class: with-border .. :width: 20px .. Add Attachment (place in Documentation/_static): `Download CSV <_static/yourfile.csv>`__ .. .. Admonitions .. .. note:: .. important:: .. tip:: .. warning:: .. Color: (blue) (orange) (green) (red) .. .. Definition: .. some text becomes strong (only one line) .. description has to indented .. .. Code Block: .. code-block:: sql .. .. -*- coding: utf-8 -*- with BOM. .. include:: Includes.txt .. _Form: Form ==== General ------- .. important:: Primary key: QFQ expect that each table, which will be loaded into a form, contains a primary key called `id`. That one should be *autoincrement*. It's not necessary to create a FormElement `id` in a form. * Forms will be created by using the *Form Editor* on the Typo3 frontend (HTML form). * The *Form editor* itself consist of two predefined QFQ forms: *form* and *formElement* - these forms are regular updated during installation of newer QFQ versions. * Every form consist of a) a *Form* record and b) multiple *FormElement* records. * A form is assigned to a *table*. Such a table is called the *primary table* for this form. * Forms can roughly categorized into: * *Simple* form: the form acts on one record, stored in one table. * The form will create necessary SQL commands for insert, update and delete (only primary record) automatically. * *Advanced* form: the form acts on multiple records, stored in more than one table. * Fields of the primary table acts like a *simple* form, all other fields have to be specified with *action/afterSave* records. * *Multi* form: (multi-form_) the form acts simultaneously on more than one record. All records use the same *FormElements*. * The *FormElements* are defined as a regular *simple* / or *advanced* form, plus an SQL Query, which selects and iterates over all records. Those records will be loaded at the same time. * *Delete* form: any form can be used as a form to :ref:`delete-record`. * Form mode: The parameter 'r' (given via URL or via SIP) decide if the form is in mode: * `New`: * Missing parameter 'r' or 'r=0' * On form load, no record is displayed. * Saving the form creates a new primary record. * E.g.: `http://example.com/home&form=Person` or `http://example.com/home&form=Person&r=0` * `Edit`: * Parameter 'r>0' * On form load, the specified record (.id= ) will be loaded and displayed. * Saving the form will update the existing record. * E.g.: `http://example.com/home&form=Person&r=123` * Providing additional parameter: Often, it is necessary to store additional, for the user not visible, parameter in a record. See :ref:`form-magic`. * Display a form: * Create a QFQ tt_content record on a Typo 3 page. * Inside the QFQ record: `form = `. E.g.: * Static: `form = Person` * Dynamic 1: `form = {{form:SE}}` (the left `form` is a keyword for QFQ, the right `form` is a variable name) * Dynamic 2: `form = {{SELECT f.name FROM Form AS f WHERE f.id=...}}` (the left `form` is a keyword for QFQ, the right `form` is a variable name) * With the `Dynamic` option, it's easily possible to use one Typo3 page and display different forms on that specific page. * If a form is edited using the JSON form editor then a backup of the previous version is saved. See :ref:`formAsFile`. How to get started ------------------ * Create a new page in your Typo3 Backend. * Create a content element of type 'QFQ Element'. * Insert ``file=_formEditor`` .. image:: Images/FormEditorSetup.png * Create a new form either by '+' or the '+json' button. * Button '+' opens the form editor. * Button '+json' open the json form editor * Define a name for the form. * Save the form. * A json structure without any FormElements are shown. * Edit form either in the FormEditor or as a json text. .. image:: Images/FormEditorFormElements2.png .. _`form-process-order`: Form process order ------------------ Depending on `form load / save` or `record delete`, different tasks are performed. Processing is divided into: * Native FormElements like: `input`, `select list`, `checkbox`, `radio`, .... * `upload` elements are categorized as native FormElement, but will be processed later. * `pill`, `fieldset` and `subrecord` elements are only processed during form load, they do not impact `save` or `delete`. * Action FormElement like `before...`, `after...`, `sendmail` ... Each FormElement has an order. Native FormElements which 'name': * corresponds to a column in the form primary table: are grouped together in one insert or update query. * do not correspond to a column in the primary table: needs an explicit defined Action FormElement to be handled. FormElement processing order: .. image:: Images/FormProcess.png .. _`record_locking`: Record locking -------------- Support for record locking is given with mode: * *exclusive*: user can't force a write. * Including a timeout (default 15 mins recordLockTimeoutSeconds in :ref:`configuration`) for maximum lock time. * *advisory*: user is only warned, but allowed to overwrite. * *none*: no bookkeeping about locks. Details: * For 'new' records (r=0) there is no locking at all. * The record locking protection is based on the `tablename` and the `record id`. Different `Forms`, with the same primary table, will be protected by record locking. * Action-`FormElements` updating non primary table records are not protected by 'record locking': the QFQ record locking is *NOT 100%*. * The 'record locking' mode will be specified per `Form`. If there are multiple Forms with different modes, and there is already a lock for a `tablename` / `record id` pair, the most restrictive will be applied. * A user opens a form: starting with the first change of content, a record lock will be acquired in the background. If the lock is denied (e.g. another user already owns a lock on the record) an alert is shown. This means: the lock timeout counts from the first change, not from the last modification on the form. * If a timeout expires, the lock becomes invalid. During the next change in a form, the lock is acquired again. * A lock is assigned to a record of a table. Multiple forms, with the same primary table, uses the same lock for a given record. * If a user tries to delete a record and another user already owns a lock on that record, the delete action is denied. * If there are different locking modes in multiple forms, the most restricting mode applies for the current lock. * If the same user opens the same recording in different tabs or browsers, the user has the possibility to skip a lock. Exclusive ^^^^^^^^^ An existing lock on a record forbids any write action on that record. Exception: locks owned by the same user might be overwritten. Advisory ^^^^^^^^ An existing lock on a record informs the user that another user is currently working on that record. Nevertheless, writing is allowed. None ^^^^ No locking at all. .. _`form-main`: Form Settings ------------- +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ | Name | Description | +=========================+====================================================================================================================================================+ |Name | Unique and speaking name of the *Form*. Form will be identified by this name. Use only ``[a-zA-Z0-9._+-]``. :ref:`form-name` | +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ |Title | Title, shown on/above the form. :ref:`form-title` | +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ |Note | Personal editor notes. :ref:`form-note` | +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ |Table | Primary table of the form. :ref:`form-tablename` | +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ |Primary Key | Primary key of the indicated table. Only needed if != 'id'. :ref:`form-primary-key` | +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ |Required Parameter NEW | Name of required SIP parameter to create a new record (r=0), separated by comma. '#' as comment delimiter. See :ref:`form-requiredParameter` | +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ |Required Parameter EDIT | Name of required SIP parameter to edit an existing record (r>0), separated by comma. '#' as comment delimiter. See :ref:`form-requiredParameter` | +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ |Permit New | 'sip, logged_in, logged_out, always, never' (Default: sip): See :ref:`form-permitNewEdit` | +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ |Permit Edit | 'sip, logged_in, logged_out, always, never' (Default: sip): See :ref:`form-permitNewEdit` | +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ |Permit REST | See :ref:`restApi` | +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ |Escape Type Default | See :ref:`variable-escape`. | +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ |Show button | 'new, delete, close, save' (Default: 'new,delete,close,save'): Shown named buttons in the upper right corner of the form. | | | See :ref:`form-showButton` | +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ |Forward Mode | 'auto | close | no | url | url-skip-history | url-sip | url-sip-skip-history' (Default: auto): See :ref:`form-forward`. | +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ |Forward (Mode) Page | a) URL / Typo3 page slug or b) Forward Mode (via '{{...}}') or combination of a) & b). See :ref:`form-forward`. | +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ |labelAlign | Label align (default/left/center/right)/ Default: 'default' (defined by Config). :ref:`form-label-align` | +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ |Parameter | Misc additional parameters. See :ref:`form-parameter`. | +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ |BS Label Columns | The bootstrap grid system is based on 12 columns. The sum of *bsLabelColumns*, | +-------------------------+ *bsInputColumns* and *bsNoteColumns* should be 12. These values here are the base values | |BS Input Columns | for all *FormElements*. Exceptions per *FormElement* can be specified per *FormElement*. | +-------------------------+ Default: label=col-md-3, input=col-md-6, note=col-md-3. See :ref:`form-layout`. | |BS Note Columns | | +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ |multiMode | NOT IMPLEMENTED - 'none, horizontal, vertical' (Default 'none') | +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ |multiSql | NOT IMPLEMENTED - Optional. SQL Query which selects all records to edit. | +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ |multiDetailForm | NOT IMPLEMENTED - Optional. Form to open, if a record is selected to edit (double click on record line) | +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ |multiDetailFormParameter | NOT IMPLEMENTED - Optional. Translated Parameter submitted to detail form (like subrecord parameter) | +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ |multiFormWrap | By default (if empty) wraps the form in a HTML table. Alternative is to use CSS grid. See :ref:`multi-form-grid`. | +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ |multiFormCellWrap | By default (if empty) wraps each input in ``. If 'multiFormWrap' is given but `multiFormCellWrap` is empty, than the default is `
`. | | | See :ref:`multi-form-grid`. | +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ .. _`form-permitNewEdit`: permitNew & permitEdit ^^^^^^^^^^^^^^^^^^^^^^ Depending on `r`, the following access permission will be taken: * `r=0` - permitNew * `r>0` - permitEdit +------------+---------------------------------------------------------------------------------------------------+ | Option | Description | +============+===================================================================================================+ | sip | The parameter 'form' and 'r' must be supplied via SIP or hard coded in the QFQ tt_content record. | +------------+---------------------------------------------------------------------------------------------------+ | logged_in | The form will only be shown if the current User is logged in as a FE User | +------------+---------------------------------------------------------------------------------------------------+ | logged_out | The form will only be shown if the current User is *not* logged in as a FE User | +------------+---------------------------------------------------------------------------------------------------+ | always | No access restriction, the form will always be shown | +------------+---------------------------------------------------------------------------------------------------+ | never | The form will never be shown | +------------+---------------------------------------------------------------------------------------------------+ * `sip` * is *always* the preferred way. With 'sip' it's not necessary to differ between logged in or not, cause the SIP only exist and is only valid, if it's created via QFQ/report earlier. This means 'creating' the SIP implies 'access granted'. The grant will be revoked when the QFQ session is destroyed - this happens when a user logs out or the web browser is closed. * `logged_in` / `logged_out`: for forms which might be displayed without a SIP, but maybe on a protected or even unprotected page. *The option is probably not often used.* * `always`: such a form is always allowed to be loaded. * `permitNew=always`: Public accessible forms (e.g. for registration) will allow users to fill and save the form. * `permitEdit=always`: Public accessible forms will allow users to update existing data. This is dangerous, cause the URL parameter (recordId) 'r' might be changed by the user (URL manipulating) and therefore the user might see and/or change data from other users. *The option is probably not often used.* * `never`: such a form is not allowed to be loaded. * `permitNew=never`: Public accessible forms. It's not possible to create new records. * `permitEdit=none`: Public accessible forms. It's not possible to update records. .. _`form-requiredParameter`: Required Parameter New|Edit ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Comma separated list of variable names. On form load, an error message will be shown in case of missing parameters. The parameters must be given by SIP. The list of required parameter has to be defined for `New` (r=0, create a new record) and for `Edit` (r>0, edit existing record). Optional a comment might be attached after the parameter definition. E.g.: :: New: grId, pId # Always specify a person, grId2 Edit: pId .. _`form-showButton`: showButton ^^^^^^^^^^ Display or hide the button `new`, `delete`, `close`, `save`. * *new*: Creates a new record. If the form needs any special parameter via SIP or Client (=browser), hide this 'new' button - the necessary parameter are not provided. * *delete*: This either deletes the current record only, or (if defined via action *FormElement* 'beforeDelete' ) any specified subrecords. * *close*: Close the current form. If there are changes, a popup opens and ask to save / close / cancel. The last page from the history will be shown. * *save*: Save the form. * Default: show all buttons. .. _`form-forward`: Forward: Save / Close ^^^^^^^^^^^^^^^^^^^^^ Forward (=forwardMode) """""""""""""""""""""" After the user presses *Save*, *Close*, *Delete* or *New*, different actions are possible where the browser redirects to. * `auto` (default) - the QFQ browser Javascript logic, decides to stay on the page or to force a redirection to a previous page. The decision depends on: * *Close* goes back (feels like close) to the previous page. Note: if there is no history, QFQ won't close the tab, instead a message is shown. * *Save* stays on the current page. * `close` - goes back (feels like close) to the previous page. Note: if there is no history, QFQ won't close the tab, instead a message is shown. * `no` - no change, the browser remains on the current side. Close does not close the page. It just triggers a save if there are modified data. * `url` - the browser redirects to the URL or T3 page named in `Forward URL / Page`. Independent if the user presses `save` or `close`. * `url-skip-history` - same as `url`, but the current location won't saved in the browser history. * `url-sip` - like `url`, but any given parameter will be SIP encoded. Only useful if `url` points to current web instance. * `url-sip-skip-history` - like `url-sip`, but skips the Browser history. Only with `Forward` == `url` | `url-skip-history`, the definition of `Forward URL / Page` becomes active. Forward URL / Page (=forwardPage) """"""""""""""""""""""""""""""""" Format: [] or [|] * ``: * `http://www.example.com/index.html?a=123#bottom` * `website.html?a=123#bottom` * `&a=123#bottom, ?id=&a=123#bottom` * `{{SELECT ...}}` * `|` * `` - Valid keywords are as above: `auto|close|no|url|url-skip-history|url-sip|url-sip-skip-history` Specifying the mode in `forwardPage` overwrites `formMode` (but only if `formMode` is `url...`). Also regular QFQ statements like {{var}} or {{SELECT ...}} are possible in `forwardPage`. This is useful to dynamically redirect to different targets, depending on user input or any other dependencies. If a forwardMode 'url...' is specified and there is no `forwardPage`, QFQ falls down to `auto` mode. On a form, the user might click 'save' or 'save,close' or 'close' (with modified data this leads to 'save,close'). The CLIENT `submit_reason` shows the user action: * `{{submit_reason:CE:alnumx}}` = `save` or `save,close` Example forwardPage ^^^^^^^^^^^^^^^^^^^ * `{{SELECT IF('{{formModeGlobal:S}}'='requiredOff', 'no', 'auto') }}` * `{{SELECT IF('{{submit_reason:CE:alnumx}}'='save', 'no', 'url'), '|http://example.com' }}` Type: combined dynamic mode & URL/page ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Syntax: `forwardPage=|` * `forwardPage={{SELECT IF(a.url='','no','url'), '|', a.url FROM Address AS a }}` .. _`form-parameter`: Form.parameter ^^^^^^^^^^^^^^ * Each parameter has to be on a single line. Exception: SQL statements enclosed by '{{' / '}}' can use multiple lines. * Lines will be trimmed - leading and trailing spaces will be removed. * If a leading and/or trailing space is needed, escape it: \\ hello world \\ > ' hello world '. * Lines starting with a '#' are treated as a comment and will not be parsed. Such lines are treated as 'empty lines'. * The comment sign can be escaped with \\ . * If a parameter is defined multiple time, the last one is the final one. +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | Name | Type | Description | +=============================+========+==========================================================================================================+ | dbIndex | int | Database credential index, given via :ref:`qfq.json` to let the current `Form` | | | | operate on the database. | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | btnTopLeft | | Set the regular to the left side form. | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | btnTopRight | | Set the regular to the right side of form. This is default | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | btnTopWrap | string | :ref:`button-wrapping` Overwrite default from :ref:`configuration` | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | btnTopLeftWrap | string | :ref:`button-wrapping` Overwrite default from :ref:`configuration` | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | btnTopRightWrap | string | :ref:`button-wrapping` Overwrite default from :ref:`configuration` | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | btnTopLeftOrder | string | :ref:`button-order` Overwrite default from :ref:`configuration` | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | btnTopRightOrder | string | :ref:`button-order` Overwrite default from :ref:`configuration` | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | btnFooterWrap | string | :ref:`button-wrapping` Overwrite default from :ref:`configuration` | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | btnFooterLeftWrap | string | :ref:`button-wrapping` Overwrite default from :ref:`configuration` | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | btnFooterLeftOrder | string | :ref:`button-order` Overwrite default from :ref:`configuration` | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | btnFooterRightOrder | string | :ref:`button-order` Overwrite default from :ref:`configuration` | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | btnCustom\[?\] | string | Creates a custom button using the AS _link notation. Replace "?" with the desired key name reference. | | | | This can be used in ``btnTopLeftOrder``, ``btnTopRightOrder``, ``btnFooterLeftOrder``, and | | | | ``btnFooterRightOrder`` to specify button placement. :ref:`btnCustom[]` | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | bsColumns | string | Wrap the whole form in '
. See :ref:`bs-custom-field-width`. | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | maxVisiblePill | int | Show pills upto as button, all further in a drop-down menu. Eg.: maxVisiblePill=3. | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | class | string | HTML div with given class, surrounding the whole form. Eg.: class=container-fluid. | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | classTitle | string | CSS class inside of the `title` div. Default 'qfq-form-title'. | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | classPill | string | HTML div with given class, surrounding the `pill` title line. | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | classBody | string | HTML div with given class, surrounding all *FormElement*. | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | extraDeleteForm | string | Name of a form which specifies how to delete the primary record and optional slave records. | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | data-pattern-error | string | Pattern violation: Text for error message used for all FormElements of current form. | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | data-required-error | string | Required violation: Text for error message used for all FormElements of current form. | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | data-match-error | string | Match violation: Text for error message used for all FormElements of current form. | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | data-error | string | If none specific is defined: Text for error message used for all FormElements of current form. | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | buttonOnChangeClass | string | Color for save button after user modified some content or current form. E.g.: 'btn-info alert-info'. | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | ldapServer | string | FQDN Ldap Server. E.g.: directory.example.com. | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | ldapBaseDn | string | E.g.: `ou=Addressbook,dc=example,dc=com`. | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | ldapAttributes | string | List of attributes to fill STORE_LDAP with. E.g.: cn, email. | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | ldapSearch | string | E.g.: `(mail={{email::alnumx:l}})` | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | ldapTimeLimit | int | Maximum time to wait for an answer of the LDAP Server. | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | typeAheadLdap | | Enable LDAP as 'Typeahead' data source. | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | typeAheadLdapSearch | string | Regular LDAP search expression. E.g.: `(|(cn=*?*)(mail=*?*))` | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | typeAheadLdapValuePrintf | string | Value formatting of LDAP result, per entry. E.g.: `'%s / %s / %s', mail, room number, telephone number` | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | typeAheadLdapIdPrintf | string | Key formatting of LDAP result, per entry. E.g.: `'%s', mail` | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | typeAheadLdapSearchPerToken | | Split search value in token and OR-combine every search with the individual tokens. | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | typeAheadLimit | int | Maximum number of entries. The limit is applied to the server (LDAP or SQL) and the Client. | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | typeAheadMinLength | int | Minimum number of characters which have to typed to start the search. | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | mode | string | The value `readonly` will activate a global readonly mode of the form - the user can't change any data. | | | | See :ref:`form-mode-global` | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | activateFirstRequiredTab | digit | 0: off, 1: (default) - with formModeGlobal=requiredOffButMark bring pill to front on save. | | | | See :ref:`form-mode-global` | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | enterAsSubmit | digit | 0: off, 1: Pressing *enter* in a form means *save* and *close*. Takes default from :ref:`configuration`. | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | submitButtonText | string | Show a save button at the bottom of the form, with . See :ref:`submitButtonText`. | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | saveButtonActive | | 0: off, 1: Make the 'save'-button active on *Form* load (instead of waiting for the first user change). | | | | The save button is still 'gray' (record not dirty), but the user can click 'save'. | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | saveButtonText | string | Overwrite default from :ref:`configuration` | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | saveButtonTooltip | string | Overwrite default from :ref:`configuration` | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | saveButtonClass | string | Overwrite default from :ref:`configuration` | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | saveButtonGlyphIcon | string | Overwrite default from :ref:`configuration` | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | closeButtonText | string | Overwrite default from :ref:`configuration` | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | closeButtonTooltip | string | Overwrite default from :ref:`configuration` | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | closeButtonClass | string | Overwrite default from :ref:`configuration` | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | closeButtonGlyphIcon | string | Overwrite default from :ref:`configuration` | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | deleteButtonText | string | Overwrite default from :ref:`configuration` | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | deleteButtonTooltip | string | Overwrite default from :ref:`configuration` | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | deleteButtonClass | string | Overwrite default from :ref:`configuration` | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | deleteButtonGlyphIcon | string | Overwrite default from :ref:`configuration` | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | newButtonText | string | Overwrite default from :ref:`configuration` | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | newButtonTooltip | string | Overwrite default from :ref:`configuration` | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | newButtonClass | string | Overwrite default from :ref:`configuration` | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | newButtonGlyphIcon | string | Overwrite default from :ref:`configuration` | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | extraButtonInfoClass | string | Overwrite default from :ref:`configuration` | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | extraButtonInfoMinWidth | string | See :ref:`extraButtonInfo` | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | fillStoreVar | string | Fill the STORE_VAR with custom values. See :ref:`STORE_VARS`. | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | showIdInFormTitle | string | Overwrite default from :ref:`configuration` | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | formSubmitLogMode | string | Overwrite default from :ref:`configuration` | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | sessionTimeoutSeconds | int | Overwrite default from :ref:`configuration`. See :ref:`sessionTimeoutSeconds`. | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | maxFileSize | int | Overwrite default from :ref:`configuration` | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | maxImageDimension | string | Overwrite default from :ref:`configuration` expected format `4000x4000`. | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | requiredPosition | int | See :ref:`requiredPosition` | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | clearMe | 0 / 1 | Overwrite default from :ref:`configuration`. Show a small 'x' in every input or textarea to clear field. | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | rememberLastPill | 0 / 1 | Overwrite default from :ref:`configuration`. On form load, bring last used pill to front | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | doNotLogColumn | string | Overwrite default from :ref:`configuration`. Comma separated list of Form-Element names. | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | showHistory | 0 / 1 | Overwrite default from :ref:`configuration`. Show history button in form. | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | showHistoryTitle | string | Add a new string to the history view title. | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | showHistoryFeUserSet | string | Comma separated list of feUser names. History view will only show history logs from users list or all. | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | recentLog | 0 / 1 | Overwrite default from :ref:`configuration`. For each user form open, create a record in table `Recent`. | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | fieldsetClass | string | Overwrite default from :ref:`configuration`. | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | fieldsetCss | string | Add custom css to FE.fieldset. fieldsetCss = color: white;backgroundColor: black; | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | btnPreviousNextSql | string | Query that selects records which are then accessible by the previous/next buttons. | | | | See :ref:`btnPreviousNextSql` | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | btnPreviousNextLoop | digit | 0: off, 1: Allow to loop through the records (from last to first and vice versa). | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | btnPreviousNextWrap | string | Wrap the buttons in custom HTML. Default: '
'| +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | subrecordEmpty | string | Overwrite default from :ref:`configuration`. Options: 'show:custom text example','hide','mute' | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | message | string | Execute page or message (nchain) after save or delete. | | | | E.g.: `P_[|M_::|M_:]`. See :ref:`form-message` | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ | column\[?\] | string | Sometimes some specific values should set to a table column which does not have to be a FormElement. The | | | | given value will be saved to the named table column from the primary table during save. | +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ * Example in field Form.parameter:: maxVisiblePill = 5 class = container-fluid classBody = qfq-form-right .. _`submitButtonText`: submitButtonText """""""""""""""" If specified and non empty, display a regular submit button at the bottom of the page with the given text. This gives the form a ordinary HTML-form look 'n' feel. With this option, the standard buttons on the top right border should be hidden to not confuse the user. * Optional. * Default: Empty .. _`form-message`: message """"""" Two types of executions are defined via prefix: * ``P_`` - Execute a page with given slug. Define it without slashes. * ``M_`` - Send a message to a channel with specific action and payload. (Work in progress. Not yet implemented.) For Installation see :ref:`form-message-installation`. Best practice is to define a folder with shortcuts in Typo3. Those shortcuts should not use subpaths in the slug. Message channel: Comming soon... .. _`customize-form-buttons`: Customize Form Buttons ^^^^^^^^^^^^^^^^^^^^^^ Per form the default buttons can be customized as well as additonal custom buttons defined. * Default button names: * **save** * **delete** * **new** * **close** * Names for specific developer buttons: * **formedit** * **formview** * Names for custom buttons: * All other Definition .. _`btnCustom[]`: Keyword: btnCustom[] """""""""""""""""""""""""" * Use a predefined button name within ``[]`` to customize a default button, such as ``btnCustom[save]``. * For custom buttons, any name other than the predefined names can be used, for example, ``btnCustom[myButton]``. * To ensure the correct button is rendered, prefix the predefined key name with ``p:``, as in ``btnCustom[save] = p:save``. * Using The standard QFQ notation for further customization. Examples include: * ``btnCustom[save] = p:save|G:glyphicon-ok|b|t:Save|c:navbar-btn``. * ``btnCustom[delete] = p:delete|G:glyphicon-trash|t:Delete|c:navbar-btn``. * ``btnCustom[myButton] = '{{p:{{pageSlug:T}}?form=strasse|s|b AS _link}}'`` for creating a new button named "myButton". .. _`button-order`: Button Order """""""""""" Customize the button placement and order using ``btnTopRightOrder``, ``btnTopLeftOrder``, ``btnFooterRightOrder``, and ``btnFooterLeftOrder``: * For instance, ``btnTopLeftOrder = save+delete,myButton`` positions the "save" and "delete" buttons alongside the custom "myButton" at the top left of the form. * The "+" symbol groups buttons together, while "," separates them. * By default, buttons are placed at the top right in the order of "formView+formElementEdit+formEdit,save+close,delete+new" this string can also get with {{btnTopRightOrder:DE}}. .. _`button-wrapping`: Button Wrapping """"""""""""""" Customize button wrapping in the QFQ configuration with the following parameters and their defaults: * **Top Row**: ``btnTopWrap=
`` * **Top Left**: ``btnTopLeftWrap=