Commit ed5b4038 authored by Carsten  Rose's avatar Carsten Rose
Browse files

Minor updates

parent bae73719
Pipeline #4984 passed with stages
in 3 minutes and 53 seconds
......@@ -2283,7 +2283,7 @@ Most of the slaveId concept is part of sqlInsert / sqlUpdate - see below.
.. note::
* *slaveId*: 0 (default) or any integer which references a record.
* Set *slaveId* explicit or by query: ``slaveId = 123`` or ``slaveId = {{SELECT id ...}}``
* Set *slaveId* explicit or by query: ``slaveId = 123`` or ``slaveId = {{SELECT id ...}}``.
* *fillStoreVar* is fired first, than *slaveId*. Don't use ``{{slaveId:V}}`` in *fillStoreVar*.
* To set *slaveId*, a value from STORE_VARS can be used: ``slaveId={{someId:V}}``.
* ``{{slaveId:V}}`` can be used in any query of the current *FormElement* (but not *fillStoreVar*).
......@@ -2304,9 +2304,10 @@ FormElement.parameter: sqlBefore / sqlInsert / sqlUpdate / sqlDelete / sqlAfter
.. note::
Form.parameter *sqlBefore* / *sqlAfter* is independent of Form.type *beforeLoad|Save|Insert|Update*.
Side note: a) Form.type *beforeLoad|Save|Insert|Update* is independent of b) Form.parameter *sqlBefore* / *sqlAfter*.
Think of that a) represents a class and b) is a property of a class.
All of the following attributes are optional.
All of the following attributes are optional:
* *requiredList = [<fe.name>,]* - List of `native`-*FormElement* names.
......@@ -2476,27 +2477,27 @@ Parameter
.. important::
SIP parameter equal to a primary table column name.
SIP parameter name = primary table column name
Parameter (one or more) in the SIP url, which *exist* as a column in the form table (SIP parameter name is equal to a
table column name), will be automatically saved in the record.
table column name), will be automatically saved in the record!
.. Comment to separate block
Example: A slave record (e.g. an address of a person) has to be assigned to a master record (a person). Just give the
`pId` in the link who calls the address form. The following creates a 'new' button for an address for all persons, and
the pId will be automatically saved in the address table: ::
Example: A slave record (e.g. an address of a person) has to be assigned to a master record (a person):
``person.id=address.pId``. Just give the `pId` in the link who calls the address form. The following creates a 'new'
button for an address for all persons, and the pId will be automatically saved in the address table: ::
SELECT CONCAT('p:{{pageAlias:T}}&form=address&r=0&pId=', p.id) AS _pagen FROM Person AS p
Such parameter, which the form expects to be in the SIP url, should be specified in Form.permitNew and/or Form.permitEdit.
It's only a check for the webmaster, not to forgot a parameter in a SIP url.
Remember: it's a good practice to specify such parameter in Form.permitNew and/or Form.permitEdit. It's only a check for
the webmaster, not to forgot a parameter in a SIP url.
.. note::
FormElement.type = subrecord
Subrecord's will automatically create `new`, `edit` and `delete` links. To inject parameter in those automatically created
Subrecord's typically use `new`, `edit` and `delete` links. To inject parameter in those QFQ created
links, use `FormElement.parameter.detail` . See :ref:`subrecord-option`.
.. note::
......@@ -2506,8 +2507,8 @@ It's only a check for the webmaster, not to forgot a parameter in a SIP url.
If a table column should be saved with a specific value, and the value should not be shown to the user, the FE.type='extra'
will do the job. The value could be static or calculated on the fly. Often it's easier to specify such a parameter/value
in the SIP url, but if the form is called from multiple places, an `extra` element is more suitable.
In traditional web applications HTML input fields of type hidden are often used for this. Those can be tempered by
an attacker. It's much safer to use
In traditional web applications HTML input fields of type hidden are often used for this. Such content can be tempered by
an attacker. It's much safer to use SIP parameter or *FormElement.type=extra* fields.
.. note::
......@@ -2521,7 +2522,7 @@ It's only a check for the webmaster, not to forgot a parameter in a SIP url.
* or even a *sqlDelete*.
* automatically update the named column.
For details check :ref:slave-id.
For details see :ref:`slave-id`
Variables
......
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