Contents Hide
Settings dialogs provide the functionality of adding and modifying settings within the application. These settings are persisted values that are saved to file than in memory. This means the settings for applications can be saved and kept persisted even when the BrightForms app is closed.
The Settings dialog can be used to create a form that holds fields with the purpose of holding the settings of the application. All settings specified within the dialog can be used as form values within the application. The user can also be given the ability to edit the settings within these dialogs.
By using the button, new settings are added to the application. By clicking on the setting in the settings table, you can edit options such as the field name, the text on the identifying label for setting and the field type. The field type for the setting dictates what information can be stored in the setting. Each setting will have a corresponding form value which will contain the data in the setting. Each form value will be named as follows, '<DIALOG_NAME>.<FIELD_NAME>'. The types a setting can be are:
Text: Setting can be set to a text value. The value of the setting can be added through the edit control added.
Form Value - Edit Control Text Value: If setting is of this type, the value of the edit control will be the form value.
Numeric: Numeric values can only be accepted into the settings edit control that is added to the form.
Form Value - Edit Control Numeric Value: Will contain the numeric value in the edit control.
Yes/No: Adds a check box control. If the check box is ticked value of setting is true and no if the check box is unticked. The user also has the ability to assign the check box of a default value of yes (check box is ticked initially).
Form Value - Check box Value: Contain the check box boolean value.
Date: Setting can be a date value that can be set through the DateTime Picker control added to the form. The developer can also indicate the style of the date to be shown. These styles include:
Short Date: A DateTime Picker control where a user can choose a date that is displayed in MM/dd/yyyy format.
Long Date: Date is displayed in Day, dd Month yyyy format on DateTime Picker control.
Custom: User can set their own format. By pressing the button, a help window will appear detailing the rules and available format strings that can be used in the custom style.
Form Value - DateTime Picker value: Form Value will return the value selected in the DateTime Picker control.
These settings have multiple purposes and can be used throughout the application.
Login Dialog
The setting fields added to a Settings dialog can be used to authenticate the credentials entered from a login dialog form. In the login dialog editor, if the type is changed to Application Defined Settings the value drop down menu will be populated with the Application settings defined in Settings dialogs. By doing this, the application will compare the credential/s with the specified setting.
Persisted values
The settings and their values in these dialogs can also be used as form values that are available throughout the application as a persistent data source. These form values can be used where the data source tree is available for example in the formulation of a calculated phrase and/or in setting the context a child form is opened as part of a form link. These settings are even persisted when the BrightForms app is closed as they are stored in a file to be reloaded and accessed when the BrightForms app starts again.