Это может быть выполнено с помощью FormFlow's FieldReflector's .SetActive:
[Serializable]
public class OptionalFormFlow
{
public enum Options
{
Option1 = 1,
Option2 = 2,
Other = 3
}
public Options Option { get; set; }
public string OtherOption { get; set; }
public string Name { get; set; }
public static IForm<OptionalFormFlow> BuildForm()
{
var built = new FormBuilder<OptionalFormFlow>()
.Field(nameof(Option))
.Field(new FieldReflector<OptionalFormFlow>(nameof(OtherOption))
.SetActive(state => state.Option == Options.Other))
.Field(nameof(Name), "What is your name?")
.AddRemainingFields()
.Confirm("Is this information correct? {*}")
.Build();
return built;
}
}
Результаты: