How to disable user input option while dealing with buttons?


I have created a button where the user has to choose only among the button options, and not have the option to type out his own answers. How do I disable user input in such cases?

Thanks in advance.

You can send your own custom elements by using “custom:” key in utter templates.

Here is my example:

    - text: "Are you sure?"
        - title: "Yes"
          payload: "/affirm"
        - title: "No"
          payload: "/deny"
        input_type: "disable"
        back_button: true
        exit_button: false

ref. Domains#custom-output-payloads

I think the rest depends on the implementation of the messaging client. parsing custom element from channel api response, disabling buttons by input_type value… and don’t forget to re-enable buttons on next bot message…

I hope this helps.:grinning:

1 Like

So is there no way I can do this within the Rasa framework? Because I’m currently using the rasa shell to build my bot.

I think current version of shell does not have the option for that.

In fact, user input option is recently added feature. In versions prior to 1.2.3 did not allow direct input when buttons are exists.

[1.2.3] - 2019-08-15


  • Free text input was not allowed in the Rasa shell when the response template contained buttons, which has now been fixed.


Does anyone solve this issue???