# How can we handle a question of button with yes or no in formaction?

**URL:** <https://forum.rasa.com/t/how-can-we-handle-a-question-of-button-with-yes-or-no-in-formaction/39146>\
**Category:** Rasa Open Source\
**Created:** [January 17, 2021, 7:07pm UTC](https://forum.rasa.com/t/how-can-we-handle-a-question-of-button-with-yes-or-no-in-formaction/39146 "2021-01-17T19:07:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![faiza\_conte](https://avatars.discourse-cdn.com/v4/letter/f/74df32/32.png) [@faiza\_conte](https://forum.rasa.com/u/faiza_conte)\
**Post date:** [January 17, 2021, 7:07pm UTC](https://forum.rasa.com/t/how-can-we-handle-a-question-of-button-with-yes-or-no-in-formaction/39146/1 "2021-01-17T19:07:53Z")

</div>

I have a question whether the user has the symptoms or not …the question is with button of yes or no…but in formaction how can we handle it because a user not only say yes but also can say no at the same time…

```auto
Forms:
  Itching:
  - type: from_text
    Intent: affirm

```

The above can only handle if a user clicks yes but not for no…so how can we handle that in formaction.

---

<div class="post-metadata">

**Author:** ![kalkbrennerei](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/kalkbrennerei/32/11609_2.png) [@kalkbrennerei](https://forum.rasa.com/u/kalkbrennerei)\
**Post date:** [January 21, 2021, 3:18pm UTC](https://forum.rasa.com/t/how-can-we-handle-a-question-of-button-with-yes-or-no-in-formaction/39146/2 "2021-01-21T15:18:31Z")

</div>

Hi @faiza_conte! Maybe you can check out [these lines from formbot](https://github.com/RasaHQ/rasa/blob/2371d80f9244ffd7b3323dc7efd7a0cb59e0d399/examples/formbot/domain.yml#L96-L108) to see examples how to use slot mappings for different intents!

Hope this helps!!

---

<div class="post-metadata">

**Author:** ![faiza\_conte](https://avatars.discourse-cdn.com/v4/letter/f/74df32/32.png) [@faiza\_conte](https://forum.rasa.com/u/faiza_conte)\
**Post date:** [January 22, 2021, 2:11pm UTC](https://forum.rasa.com/t/how-can-we-handle-a-question-of-button-with-yes-or-no-in-formaction/39146/3 "2021-01-22T14:11:03Z")

</div>

@kalkbrennerei thanks …I have another issue

```auto
Assume I have this code
If slot_value=='something'   
         Dispatcher.utter_message(text="something" )

Elif slot_value =='something'

  Dispatcher.utter_message(template ="utter_somethig"

Elif slot_value =='something'

 Dispatcher.utter_message(action="action_something")

```

As u see in the code I can do a text , utter, and action display of the bot…but i want to perform a formaction based on slot value like different formaction based on slot value…how can we control that in a custom action???

---

<div class="post-metadata">

**Author:** ![kalkbrennerei](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/kalkbrennerei/32/11609_2.png) [@kalkbrennerei](https://forum.rasa.com/u/kalkbrennerei)\
**Post date:** [January 28, 2021, 9:20am UTC](https://forum.rasa.com/t/how-can-we-handle-a-question-of-button-with-yes-or-no-in-formaction/39146/4 "2021-01-28T09:20:17Z")

</div>

Hi @faiza_conte! Not sure if I understand correctly. You can use the `Tracker.get_slot ` to retrieve slot values as you can see in the [docs](https://rasa.com/docs/action-server/sdk-tracker). If you have more questions about this, can you please create a new question on the forum? Thanks!! 😃
