Wiki source code of Grundeigenschaften


Show last authors
1 The basic properties //name//, //width// and //hidden// are available for all form elements.
2
3 {{figure image="designer_properties_base_de.png"}}
4 This panel lets you configure basic properties such as the element's name and its width.
5 {{/figure}}
6
7 {{figure image="designer_properties_base_repeatable_elements_de.png"}}
8 Elements can be repeated to allow the user to enter one or more data sets.
9 {{/figure}}
10
11 {{figure image="designer_properties_base_repeat_trigger_de.png"}}
12 The number of times an element is repeated can be set via a trigger. In this example, the fieldset with the personal data of a person's child is repeated. The number of repetitions depends on the number of children the user has selected.
13 {{/figure}}
14
15 {{table dataTypeAlpha="0" fullwidth="false" colWidth="-500"}}
16 |=Name|=Description
17 |Element|You can change an element's type via the drop down menu. For example, you could change a single input field into a multi line input field (textarea). The element types that are available depend on the original element type. [[Container>>doc:Formcycle.Designer.Form.FormElements.Container]] and [[fieldsets>>doc:Formcycle.Designer.Form.FormElements.Fieldset]] cannot be changed into other form elements.
18 |Name|Technical name of the elements. Only letters and numbers are allowed. The name is used, for example, to refer to the form field during workflow processing. To change the name and update the references to this form element at the same time the [[Rename form elements>>||anchor=form_element_refactoring]] function {{icon name="pencil" /}} should be used.
19 |Alias|An alternative technichal name that may contain any character.
20 |Width|The width of the form element, relative to other elements in the same row. For example, when you place three elements next to each other in the same row and set their widths to //10//, //10// und //30//, they will take up //20%// (=10/(10+10+30)), //20%//, and //60%// of the entire width of the row, respectively.
21 |Hidden|When enabled, the form element is hidden and will not be visible to the user. If you wish to hide or show the element dynamically, depending on the value of another element, use [[the hidden if condition>>doc:Constraints]] or a JavaScript function such as {{jsdoc name="visible" page="jquery"/}}.
22 |Disabled|When enabled, the value of the form element cannot be edited. Also, the value will not be transmitted to the server when the user submits the form. For text input fields you can optionally decide whether you want to transmit the value when the form is submitted.
23 |Repeat{{id name="repeat"/}}|When enabled, the user can create an arbitrary amount of repetition (copies) of the element. This is useful, for example, when the user needs to enter one or more email addresses. Please note that repeated elements cannot be nested: A container or fieldset that is repeated cannot contain elements that are also repeated.
24 |Min repetitions|Minimum number of repetition that must exist. When this limit is reached, the user cannot delete any more repetitions. This limit is also the initial number of repeated elements that are displayed when the form is opened for the first time.
25 |Max repetitions|Maximumer of allowed repetitions. When this limit is reached, the user cannot add anymore more repetitions.
26 |Repeat trigger|When an element is selected, the value of that element determines how many repetitions are created. For example: A [[select element>>doc:Formcycle.Designer.Form.FormElements.Selection]] or [[input field>>doc:Formcycle.Designer.Form.FormElements.Input]] lets the user enter the number of children they have. A [[fieldset>>doc:Formcycle.Designer.Form.FormElements.Fieldset]] with the personal data of a child is marked as repeated, and its trigger is set to the select or input field. Now, when the user changes the number of children, the appropriate number of fieldsets are created automatically.
27 |Hide buttons|Available only when a repeat trigger was set. When enabled, the plus and minus buttons for adding and removing elements are hidden. This is useful when the number of repetitions should depend only on the value of another field and the user should not be able to alter the number of repetitions directly.
28 {{/table}}
29
30 == Alias ==
31
32 When a form is submitted, the entered data is transmitted as key value pairs (//element name// {{rarrow/}} //value//. The name must contain only letters and number. You can use the name of an element as form variables during workflow processing to refer to the transmitted values. The name is also used when sending the submitted data to other system via an interface. Sometimes, when you need to integrate external third-party system into FORMCYCLE, the external system may require a particular name for a form field, which may include special character. In this case, you can use the alias name, which allows all special characters to be entered.
33
34 When an alias was set, you can use that alias instead of the orignal name to refer to the form field.
35
36 {{id name="form_element_refactoring"/}}
37 == Renaming form elements ==
38
39 If form elements are simply renamed, parts of the JavaScript or form workflow may no longer work correctly because they reference the form element by its name. By clicking on the pencil icon {{icon name="pencil"/}} next to the form element name, the form element can be renamed, updating all references to the form element at the same time. You can select where to search for references to the form element:
40
41 * in the JavaScript area of the form
42 * in the CSS area of the form
43 * in JavaScript form files
44 * in CSS form files
45 * in the workflow of the form
46 * for elements on the property "Value"
47 * for elements on the property "Buttons"
48 * for elements on the property "Options"
49
50 If a reference is found in the selected areas, it will be updated with the new name.
51
52 You need to pay special attention to JavaScript code. Common ways of referencing a form element are taken care of. The name in usual selectors such as //$('[name="tfEmail"]')// is replaced with the new name. However, uncommon selectors such as //document.getElementByName("tfEmail")// are not replaced.
53
54 Moreover, please note that it is not possible, even in principle, to replace all references in a complex programming language such as JavaScript. For example, the name may be be taken from a variable, from a computation or from an external data source: //["EMail", "Vorname", "Nachname"].forEach(name => $(`[name="tf${name}"]`).clear())//. Such cases require you to adjust the JavaScript manually. If you have forms with complex JavaScript code, you should always evaluate the effects of renaming a form element beforehand.