Search code examples
c#botframeworkformflow

Custom message for enum options in formflow - C# Bot Framework


I am working with MS bot framework and I can't find way to custom message for enum options in form flow. I have tried with prompt attribute but it doesn't work.

What I want is: bot will show options for user like:

1) Yes, I want to be a DayNinja!

2) No, I don't want to unlock flow to achieve my goals.

3) Later, I'll start with the basics

Now, All I get are: "Yes", "No", "Later"

Any help will be appreciated Thank you!

My code


Solution

  • You are using the wrong attribute. Instead of using the Prompt attribute, you need to use the Describe one.

    enter image description here

    public enum OpeningHubOptions
    {
        [Describe("Yes, I want to be a DayNinja")]
        Yes = 1,
    
        [Describe("No, I don't want to unlock flow to achieve my goals.")]
        No = 2,
    
        [Describe("Later, I''ll start with the basics")]
        Later = 3
    }