Wiki source code of Variablenbereich


Hide last authors
spe 11.1 1 {{figure image="designer_advanced_variables_example_en.png"}}
2 Add hidden input fields in the variables tab. You can use them for data that should not be visible in the form, but needs to be accessed on the server or via JavaScript.
gru 1.1 3 {{/figure}}
4
spe 11.1 5 The variables tab of the {{designer/}} lets you add additional form, invisible fields. These are never shown in the form. They can be accessed on the server (plugins, workflow actions) or via JavaScript.
gru 1.1 6
spe 11.1 7 We distinguish between two different types of variables:
gru 1.1 8
spe 11.1 9 * Server-only variables: They are never available in the browser and cannot be accessed from JavaScript. You can only use them on the server, eg. with plugins or workflow actions.
10 * Server and client variables: They can be accessed from JavaScript and are also available on the server. This creates hidden input fields in the form: {{code language="none"}}<input type="hidden">{{/code}}
gru 1.1 11
spe 11.1 12 Just as with normal form fields, you can access variables by their name. On the server, you need to use the alias instead. To set an initial value for a variable, enter it in the default value column. Finally, you can also [[prefill variables via URL parameters>>doc:Formcycle.Designer.Form.URLParameter]]. The name of the URL parameter must match the name of the variable.
gru 1.1 13
spe 11.1 14 For each variable, you can set the following options:
spe 8.1 15
spe 11.1 16 ; Server side only
17 : Whether the variable is available on the client or not, eg. whether it can be accessed in the browser via JavaScript.
gru 1.1 18 ; Name
spe 11.1 19 : The name of the hidden input field, used in the browser to refer to the variable.
gru 1.1 20 ; Alias
spe 11.1 21 : The name of the hidden input field, used on the server to refer to the variable.
22 ; Default value
23 : Default value of the variable.