Getting the list of names in the Form

Hi am trying to get multiple values in the form for appointment booking. For few of the slots i want to populate the list to the user and then ask them to select from it. Eg For doctors i want to give them a list of doctor’s name to select from.
image

return { “location”: [ self.from_entity(entity=“location”), self.from_text(intent=“location”), ], “name”: [ self.from_entity(entity=“name”), self.from_text(intent=“enter_data”), ],

How to get the static data and the data from API for the names of the doctors. Any help over here @JiteshGaikwad, @akelad

Hi @shubh802,

Drop-down lists are something you’d need to use a custom output payload for depending on the channel you’re using. You could specify the payload as json in your custom action, and fill the names of the doctors from your database/wherever you’re getting their names from

Just a note with regards to mentioning people in posts, please take a look at How to use Solutions & Mentions for guidelines; it’s helpful if you don’t mention multiple community members or members of the rasa team in your post.

Thanks for help @mloubser. My apologies, will make sure I don’t mention multiple people in community.

1 Like