|bsLabelColumns | string | 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|
|bsInputColumns | string | for all formelements. Exceptions per formelement can be specified per formelement. |
Display or hide the button 'new' and / or 'delete'.
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, hide this 'new' button - the necessary parameter are not provided.
* *delete*: The simple form of deleting a record only deletes the record itself, not any child records.
* *delete*: This either deletes the current record only, or (if defined via action form element 'before Delete' ) 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-parameter:
Field: Form.parameter
^^^^^^^^^^^^^^^^^^^^^
parameter
^^^^^^^^^
* The following parameter are optional and can be configured in the *Form.parameter* field.
* Pills are containers for 'fieldset' *and* 'native' Form-Elements.
* Pills are containers for 'fieldset' *and* / *or* 'native' Form-Elements.
* Fieldsets are containers for 'native' Form-Elements
Type: fieldset
...
...
@@ -878,6 +929,11 @@ Type: editor
Type: note
^^^^^^^^^^
Type: password
^^^^^^^^^^^^^^
* Like a `text` element, but every character is shown as a asterisk.
Type: radio
^^^^^^^^^^^
...
...
@@ -1009,15 +1065,6 @@ will be rendered inside the form as a HTML table.
* *Constant '&'*: Indicate a 'constant' value. E.g. `&12:xId` or `{{...}}` (all possibilities, incl. further SELECT
statements) might be used.
Type: string
^^^^^^^^^^^^
Type: submit
^^^^^^^^^^^^
Typically not used. Useful if user wishes an explicit 'Submit' Button.
Type: time
^^^^^^^^^^
...
...
@@ -1080,12 +1127,23 @@ Class: Action
Type: before... | after...
^^^^^^^^^^^^^^^^^^^^^^^^^^
These type of 'action' formelements will be used to implement data validation or creating/updating additional records.
Types:
* beforeLoad
* good to grant access permission.
* afterLoad
* beforeSave
* good to prohibit creating of duplicate records.
* afterSave
* good to create & update additional records.
* beforeInsert
* afterInsert
* beforeUpdate
...
...
@@ -1093,55 +1151,85 @@ Types:
* beforeDelete
* afterDelete
* Check data
Validate
''''''''
Perform checks by fireing s SQL query and expecting a predefined number of selected records. Depending on the
'action'-type, the check is perform on form load, or form save.
Perform checks by fireing a SQL query and expecting a predefined number of selected records.
* OK: the expected number of records has been selected. Continue processing the next FormElement.
* Fail: the expected number of records has not been selected (less or more): Display an error message and abort the
current form load or form 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’‘’:
* ‘’‘requiredList‘’‘ - List of `native`-FormElements: only if all of those elements are filled, the current
`action`-FormElement will be processed.
* ‘’‘sqlValidate’‘’ - query. E.g.: `sqlValidate={{!SELECT id FROM Person AS p WHERE p.name LIKE {{name:F:all}} AND p.firstname LIKE {{firstname:F:all}} }}`
* `requiredList` - 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` - 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}} }}`
* Pay attention to '{{!...' after the equal sign.
* ‘’‘expectRecords‘’‘ - number of records. E.g.: `expectRecords=0` or `expectRecords=0,1` or `expectRecords={{SELECT COUNT(id) FROM Person}}`
* `expectRecords` - 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.
* ‘’‘messageFail‘’‘ - Message to show. E.g.: `messageFail=There is already a person called {{firstname:F:all}} {{name:F:all}}`
* Insert / Update / Delete records
* `messageFail` - Message to show. E.g.: `messageFail=There is already a person called {{firstname:F:all}} {{name:F:all}}`
sqlInsert / sqlUpdate / sqlDelete
'''''''''''''''''''''''''''''''''
* Save values of a form to different record(s), optionally on different table(s).
* Typically usefull on 'afterSave' - be carefull when using it earlier, e.g. beforeLoad.
FormElement.’‘’parameter’‘’:
FormElement.’‘’parameter’‘’:
* ‘’‘requiredList‘’‘ - List of `native`-FormElements: only if all of those elements are filled, the current
* `requiredList` - List of `native`-FormElements: only if all of those elements are filled, the current
`action`-FormElement will be processed.
* ‘’‘slaveId‘’‘:
* `slaveId`:
* 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 columnname, set `slaveId=0`.
* Explicit definition: `slaveId=123` or `slaveId={{SELECT id ...}}`
* `sqlInsert`: fired if `slaveId=0` or `slaveId=''`.
* `sqlUpdate`: fired if `slaveId>0`:
* `sqlDelete`: always fired (after sqlInsert or sqlUpdate) - the definition, when this query is fired, might change in
the future.
Note:
* `{{slaveId:V}}` can be used in any query as the current slaveId. It's *important* to Specify Store V!
* 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() acts as the new `slaveId`).
* If `slaveId` does not exist or is empty (e.g. a defined query has an empty result):
Example
'''''''
* If there is a primary table column, with the same name as the current `action`-FormElement: take the value from that column as `slaveId`.
* If not: treat it as '0'.
Situation 1: master.x_id=slave.id (1:1)
* A value of `0` means the following `sqlInsert` will be fired.
* A value > `0` means the following `sqlUpdate` will be fired and the `slaveId` specifies which one.
* Access the `slaveId` by using the variable `{{slaveId:V}}` inside of `sqlUpdate`, `sqlInsert` or `sqlDelete`.
* Name the action element 'x_id': than {{slaveId}} will be automatically set to the value of 'master.x_id'
* ‘’‘sqlUpdate‘’‘ - query. E.g.: `sqlUpdate={{UPDATE Address SET street = '{{street:F:all}}' WHERE id={{slaveId:V}} LIMIT 1}}`
* ‘’‘sqlInsert‘’‘ - query. E.g.: `sqlInsert={{INSERT INTO Address (pId, street) VALUES ( {{id:R}}, '{{street:F:all}}' WHERE id={{slaveId:V}} }}`
* {{slaveId}} == 0 ? 'sqlInsert' will be fired.
* {{slaveId}} != 0 ? 'sqlUpdate' will be fired.
* ‘’‘sqlDelete‘’‘ - query: E.g.: `sqlDelete={{DELETE FROM Address WHERE id={{slaveId:V}} AND ''='{{city:F:allbut:s}}' LIMIT 1}}`
* In case of fireing 'sqlInsert', the 'slave.id' of the new created record are copied to master.x_id (the database will
be updated automatically).
* If the `action`-FormElement name exist as a column in the master record: Update that column with the recent slaveId
(after an INSERT the last_insert_id() acts as the new `slaveId`).
* If the automatic update of the master record is not suitable, the action element should have no name or a name
which does not exist as a column of the master record. Define `slaveId={{SELECT id ...}}`
Situation 2: master.id=slave.x_id (1:n)
* Name the action element different to any columnname of the master record (or no name).
* Determine the slaveId: `slaveId={{SELECT id FROM slave WHERE slave.xxx={{...}} LIMIT 1}}`
* {{slaveId}} == 0 ? 'sqlInsert' will be fired.
* {{slaveId}} != 0 ? 'sqlUpdate' will be fired.
Type: sendmail
...
...
@@ -1526,55 +1614,57 @@ Column: _link
* Column names like `_pagee`, `_mailto`, ... are wrapper to class link.
* The parameters for link contains a prefix to make them position-independet.
|x | |Page |p:<pageId> |p:impressum |Prepend '?' or '?id=', no hostname qualifier (automatically set by browser), default link class: internal, default value: {{pageId}} |
| | |SIP |s[:0|1] |s, s:0, s:1 |If 's' or 's:1' a SIP entry is generated with all non Typo 3 Parameters. The URL contains only parameter 's' and Typo 3 parameter |
|x | |Page |p:<pageId> |p:impressum |Prepend '?' or '?id=', no hostname qualifier (automatically set by browser), default link class: internal, default value: {{pageId}} |
| | |URL Params |U:<key1>=<value1>[&<keyN>=<valueN>]|U:a=value1&b=value2&c=... |Any number of additional Params. Links to forms: U:form=Person&r=1234 |
| | |SIP |s[:0|1] |s, s:0, s:1 |If 's' or 's:1' a SIP entry is generated with all non Typo 3 Parameters. The URL contains only parameter 's' and Typo 3 parameter |