botframework-sdk icon indicating copy to clipboard operation
botframework-sdk copied to clipboard

Add other options when user types help

Open bluekite2000 opened this issue 10 years ago • 4 comments

If I type help I get • You are filling in the request field. Possible responses: • You can enter anything (use "'s to force string). • Back: Go back to the previous question. • Help: Show the kinds of responses you can enter. • Quit: Quit the form without completing it. • Reset: Start over filling in the form. (With defaults of your previous entries.) • Status: Show your progress in filling in the form so far. • You can switch to another field by entering its name. (Request). Can I add a few other lines? If yes how ( I m using c#)

bluekite2000 avatar Apr 22 '16 17:04 bluekite2000

Help is specified through templates which you can override on the field, class or globally either as an attribute in your code or using the builder. In this case it sounds like you want to override it on the field basis. [Template(TemplateUsage.Help, "<what help you want. {0} is recognizer help string and {1} is command help>"]

The default string is: You are filling in the {&} field. Possible responses: {0} {1}

chrimc62 avatar Apr 22 '16 17:04 chrimc62

@chrimc62 Can you clarify? I m unclear on the syntax of [Template(TemplateUsage.Help, ""] and where to put it.

bluekite2000 avatar Apr 22 '16 23:04 bluekite2000

class MyForm { [Template(TemplateUsage.Help, "This is some help for {&}\n{0}\n{1}")] public string MyField; }

Documentation and examples on attributes: http://docs.botframework.com/sdkreference/csharp/forms.html#attributes You can also find out about the pattern language as well.

chrimc62 avatar Apr 23 '16 01:04 chrimc62

Hi, Is there anyway to stop the help string from coming even if I type help????

I wanted this so as to avoid the help string from coming while having an intend called "Help Desk". Because right now even though the intend "help desk" will be clicked. the help string would also be shown along with it!!!!

PrasadGautham avatar Feb 22 '17 09:02 PrasadGautham