Commit 4cfe7b62 authored by Carsten  Rose's avatar Carsten Rose
Browse files

UsersManual/Index.rst: adjusted checkbox doc

parent ffa4c743
......@@ -23,6 +23,7 @@ Features not implemented now
* FormElement:
* type=action (especially not *addNupdate*)
* field dependencies (activating a parent element, activates child elements and vice versa)
* Checkbox: some combinations not tested.
QFQ content element
-------------------
......@@ -592,38 +593,41 @@ Class: native
Type: checkbox
^^^^^^^^^^^^^^
| Parameter |
| checkBoxMode |
| checked |
| unchecked |
| label2 |
| itemList | E.g.: 'red,blue,orange' or '1:red,2:blue,3:orange' |
Checkboxes can be rendered in mode:
* Mode: checkBoxMode=single
* *single*:
* This mode is selected if the attribute checkBoxMode is missing and the number of fields of the set/enum definition is <3.
* FormElement type: string, set, enum.
* One Checkbox.
* Field 'parameter':
* One column in a table corresponds to one checkbox.
* The value for stati *checked* and *unchecked* are free to choose.
* This mode is selected, if a) *checkBoxMode* = single, or b) *checkBoxMode* is missing **and** the number of fields of the column definition is <3.
* *parameter*:
* checkBoxMode=simple (optional)
* checked=<value> (optional)
* unchecked=<value> (optional)
* label2=<value> (Text right beside checkbox) (optional)
* *checkBoxMode* = single (optional)
* *checked* = <value> (optional, the value which represents 'checked')
* If checked="":
* If *checked* is empty or missing: If *type* = 'enum' or 'set', get first item of the definition. If *type* = string, get default.
* If 'enum' or 'set', get first item. If string, get default.
* *unchecked* = <value> (optional, the value which represents 'unchecked')
* If unchecked='':
* If *unchecked* is empty or missing: If *type* = 'enum' or 'set', get second item of checked. If *type* = 'string', get ''.
* If 'enum' or 'set', get opposite item of checked. If string, get ''.
* *label2* = <value> (Text right beside checkbox) (optional)
* Mode: checkBoxMode=multiple (as many as field values)
* Type *enum*
* Each field value right beside the checkbox.
* Create a *<br>* after every *maxLength* checkboxes (0: no <br>)
* *multi*:
* One column in a table represents multiple checkboxes. This is typically usefull for the column type *set*.
* The value for status *checked* are free to choose, the value for status *unchecked* is always the empty string.
* Each field key (or the corresponding value from the key/value pair) will be rendered right beside the checkbox.
* *parameter*
* *checkBoxMode*: multi
* *orientation*: vertical | horizontal (default), optional - the checkboxes are rendered horizontal or vertical.
* *itemList* - E.g.:
* ``itemList=red,blue,orange``
* ``itemList=1:red,2:blue,3:orange``
* ``itemList={{!SELECT id, value FROM someTable}}``
Type: date
^^^^^^^^^^
......@@ -700,32 +704,38 @@ Type: select
Type: subrecord
^^^^^^^^^^^^^^^
* 'subrecord' will be rendered as html table.
* FormElement.'''sql1''': SQL query to select records. E.g.::
'subrecord' will be rendered as HTML table.
* *parameter*
* *detail*: e.g. *detail=id:gr_id,#{{a}}:p_id,#12:x_id*
* *form*: Target form, e.g. *form=person*
* *page*: Target page with detail form. If none specified, use the current page
* *title*: Title displayed over the table.
{{!SELECT a.id AS id, CONCAT(a.strasse, a.hausnummer) AS a, a.city AS b, a.zip AS c FROM adresse AS a}}
* *sql1*: SQL query to select records. E.g.::
{{!SELECT a.id AS id, CONCAT(a.strasse, a.hausnummer) AS a, a.city AS b, a.zip AS c FROM adresse AS a}}
# Remark the **exclamation mark** after '{{' - this is necessary to return an array of elements, instead of a single string.
* Exactly one column 'id' has to exist and specifies the primary record for the target form.
* Columnname: *<title>[|<number>][|width=<number>][|nostrip][|icon][|url][|mailto]*
* '''<number>''': any 'digit only' will be treated as '''width'''.
* '''width=<number>''': max. number of chars displayed per cell in the column.
* '''nostrip''': by default, html tags will be stripped off the cell content before rendering. This protects the table layout. 'nostrip' deactivates the cleaning to make links, images, ... possible.
* '''icon''': the cell value contains the name of an icon in *fileadmin/icons*. Empty cell values will omit an html image tag (=nothing renderd in the cell).
* '''mailto''': value will be rendered as a mailto link.
* '''url''': value will be rendered as a link.
* '''title=<text>''' or '<none of the above>': column '''title'''.
* *<number>*: any 'digit only' will be treated as '''width'''.
* *width=<number>*: max. number of chars displayed per cell in the column.
* *nostrip*: by default, html tags will be stripped off the cell content before rendering. This protects the table layout. 'nostrip' deactivates the cleaning to make links, images, ... possible.
* *icon*: the cell value contains the name of an icon in *fileadmin/icons*. Empty cell values will omit an html image tag (=nothing renderd in the cell).
* *mailto*: value will be rendered as a mailto link.
* *url*: value will be rendered as a link.
* *title=<text>* or '<none of the above>': column '''title'''.
* The parameters are position independet.
* Examples::
SELECT note1 AS 'Comment', note2 AS 'Comment\|50' , note3 AS 'title=Comment\|width=100\|nostrip', note4 AS '50\|Comment',
'checked.png' AS 'Status\|icon', email AS 'mailto', CONCAT(homepage, '\|Homepage') AS 'url' ...
* Exactly one column 'id' has to exist and specifies the primary record for the target form.
* FormElement.'''parameter'''
* '''detail''': e.g. *detail=id:gr_id,#{{a}}:p_id,#12:x_id*
* '''form''': Target form, e.g. *form=person*
* '''page''': Target page with detail form.
* '''title''': Title displayed over the table.
Type: string
^^^^^^^^^^^^
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment