Commit 9815cca0 authored by Carsten  Rose's avatar Carsten Rose

Manual.rst: update planned usage of typeaheadtag

parent e7823898
Pipeline #3290 passed with stages
in 3 minutes and 34 seconds
......@@ -3566,13 +3566,17 @@ Type Ahead Tag
""""""""""""""
This extends a TypeAhead input element to take more than one token (=tag) in the same input element. The user starts
typing and this searches a list defined by *typeAheadSql*. The user selects An element can be selected by
typing and this searches a list defined by *typeAheadSql*. The user selects an element by clicking on it or by using one
of the *typeAheadTagDelimiter* characters (by default tab or comma). If a tag is selected, it will be visual separated
from the input cursor. Already selected tags can not be edited but removed (clicking on the x). Further tags can be selected.
The maximum number
Usage: A user might choose one or more tags from a typeahead list (to minimize typos and to reuse already given tags).
Usage: A user might choose multiple tags from a typeahead list (to minimize typos and to reuse already given tags).
*typeAhaedTag* support two modes:
Tags might be saved in a string (primary table column as defined in *FormElement.name*
* Mode *tag*: Default. User selected tags will be given as a comma separated list. Maximum of saved records is limit by
the size of the column.
* Mode *glue*: Activated by set *sqlInsertGlue*. Details see `ta_mode_glue`_
* *FormElement.parameter*:
......@@ -3580,13 +3584,24 @@ Tags might be saved in a string (primary table column as defined in *FormElement
* *typeAheadTagDelimiter* = List of ASCII codes to separate tags during input. Default '9,44' (tab and comma).
* *sqlInsertTag* = {{INSERT INTO tags (name) VALUES (?)}}
* *sqlInsertGlue* = {{INSERT INTO glue (name) VALUES (?)}}
* *slaveId* = Used in glue mode {{!SELECT
* *FromElement.value* = Used in glue mode {{!SELECT
If FormElement.name points to a primary table column, the user selected tags are saved as comma selected list
If Parameter *sqlInsertGlue* is given, tags are assigned by glue, not by defining them directly in the string.
.. _'ta_mode_glue':
Mode: Glue
;;;;;;;;;;
Instead of saving the tag value (mode *tag*), save references (=glue) to the tags.
In *FormElement.value* select all references and the shown values:
{{!SELECT gl.id AS id, t.value AS value FROM Glue AS gl, Tag as t WHERE gl.recordId={{id:R}} AND gl.idTag=t.id}}
The maximum number of tags is not limited.
If the user removes a tag, the corresponding glue record will be deleted. QFQ detects such records by comparing the initial
dataset of FormElement.value (looking for missing tags on form save).
Type: editor
......
Markdown is supported
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