Disable user input for button response

This post is to provide a solution for the case of integrating with rasa-webchat widget as I could not find any solution online for this and thought I would share.

This is for Rasa 3.x.

To use buttons while disabling user input, you could follow the following format while creating your response.

 utter_choose_outdoor:
  - custom:
      data:
        text: "Please choose an option"
        buttons:
        - title: "Outdoor"
          payload: /inform{{"location":"outdoor"}}
        - title: "Indoor"
          payload: /inform{{"location":"indoor"}}
        metadata:
          userInput: "disable"
1 Like