Hi,
I have created a form which has a bool property which when the form first loads should be invisible until another action has been completed.
This works fine if I have a checkbox editor however when I use a switch the form item will show regardless.
Any info on how to resolve this is much appreciated.
Below is the Code I am using to set the property visibility when the form is first loaded:
private void DataForm_AutoGeneratingDataFormItem(object sender, AutoGeneratingDataFormItemEventArgs e)
{
if (e.DataFormItem != null)
{
if (e.DataFormItem.Name == "Description" || e.DataFormItem.Name == "StartDate" || e.DataFormItem.Name == "EndDate")
{
e.DataFormItem.LayoutOptions = LayoutType.TextInputLayout;
}
if (e.DataFormItem.Name == "Reminders")
{
e.DataFormItem.Editor = "Switch";
e.DataFormItem.IsVisible = false;
}
}
}