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

#4456 / formModeGlobal=requiredOff - update Manual.rst

parent ccf7033b
......@@ -1982,23 +1982,32 @@ See also: `delete-record`_.
.. _form-mode-global:
Form mode global - 'readonly'
'''''''''''''''''''''''''''''
Form mode global
''''''''''''''''
The Form global mode `mode` is given by default with `{{formModeGlobal:SE:alnumx}}`.
The form.parameter setting `mode=readonly` will switch the whole form into a `readonly` mode, which is a fast way to use
an existing *Form* just to display the form data, without a possibility for the user to change any data of the form.
The mode can be statically defined in the *Form.parameter* field via::
Optional it might be defined via *Form.parameter* ::
mode=readonly
mode=readonly|requiredOff
Or dynamically, e.g. via::
mode={{formModeGlobal:S:alnumx}}
* `readonly`: all `FormElement`s of the whole form are temporarily in `readonly` mode. This is a fast way to use an
existing *Form* just to display the form data, without a possibility for the user to change any data of the form.
Such variant might be called via SIP. The following shows the same *Form* in the `regular` mode and second in `readonly` mode::
* `requiredOff`: all `FormElement`s of the whole, with `mode=required`, will temporarily switch to `mode=show`. In this
mode, the user might save the form without providing all necessary data. Later on, when application logic requires a
final submit, this mode is not used any longer (call the form as regular without the 'formModeGlobal' parameter) and
the form can only be saved with all data given.
Than, e.g. an action-FormElement 'afterSave' can be used to detect the final submit situation and do some extra stuff,
necessary for the final submit.
10.sql = SELECT CONCAT('from&form=person&r=', p.id) as _Pagee, CONCAT('from&form=person&formModeGlobal=readonly&r=', p.id) as _Pagee FROM Person AS p
The following shows the same *Form* in the `regular`, `readonly` and `requiredOff` mode::
10.sql = SELECT CONCAT('from&form=person&r=', p.id, '|Regular') as _Pagee,
CONCAT('from&form=person&formModeGlobal=readonly&r=', p.id, '|Readonly') as _Pagee,
CONCAT('from&form=person&formModeGlobal=requiredOff&r=', p.id, '|Required off') as _Pagee
FROM Person AS p
..
FormElements
......
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