Menu Functions
Menu fields are found in the drawer, which opens when a user presses the menu icon. The menu field function is called from AISCalls.js in the JetTranslations function. Menu fields are saved when the user presses the save button in the drawer and are the values used when the user re-enters the application.
The function called setMenuFieldID looks like this:
setMenuFieldId(self, id, label, inputType, value, converter, validators, options, optionChange); inputType, converter, validators, options, optionChange can be more defined in JET cookbook for each inputType.
The following table describes the variables used by the setMenuFieldID function:
Variable |
Description |
---|---|
self |
Self is passed into jetTranslations and needs to be passed on to the function. |
id |
This is the html ID of the component. This allows the user to reference the html component later on. |
label |
This is the label placed in front of the input component. |
inputType |
inputType is the JET component-defined input. See |
value |
This is the value displayed when the html is rendered. |
converter |
This variable is used to convert the value that the user inputs. |
validators |
Validators allow the user to define whether the component should be validated. |
options |
Options are an array used to define values in a drop-down box. |
optionChange |
optionChange is a function that is used to detect when the drop-down box value changes. |