
IF checkboxEnable == false
{
edPassword.Disable()
}
ELSE
{
edPassword.Enable()
}
Note:
checkboxEnable – a Form control, check box used as a flag in this instance to enable or disable the edit control.
edPassword – a Form control, edit control.
When disabled, the user will not be able to add or edit text into the edit control.
A disabled edit control will appear shaded out on the form.
IF boolShow == false
{
edPassword.Hide()
}
ELSE
{
edPassword.Show()
}
Note:
boolShow – a Form Variable, used as a flag in this instance to check whether to display or hide the edit control.
edPassword – a Form control, edit control.
The edit control will not be visible on the form when it is hidden.
//Check password
IF System.IsPasswordCorrect(edPassword) == false
{
//Re-enter password
edPassword = ""
edPassword.SetFocus()
}
ELSE
{
//Proceed
Form.OpenChildForm("fChild")
}
Note:
System.IsPasswordCorrect(edPassword) – System method, checks the contents of edPassword with the password in BrightForms settings.
edPassword – a Form control, edit control.
Form.OpenChildForm(“fChild”) – Form method, opens “fChild” form.
Set Focus would usually be used when opening a form and setting a starting point for the user or when prompting the user to enter something in the edit control.