# Checkbox as custom component

**URL:** <https://forum.rasa.com/t/checkbox-as-custom-component/31981>\
**Category:** Rasa Open Source\
**Created:** [July 29, 2020, 1:50pm UTC](https://forum.rasa.com/t/checkbox-as-custom-component/31981 "2020-07-29T13:50:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nadachaabani1](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/nadachaabani1/32/5919_2.png) [@nadachaabani1](https://forum.rasa.com/u/nadachaabani1)\
**Post date:** [July 29, 2020, 1:50pm UTC](https://forum.rasa.com/t/checkbox-as-custom-component/31981/1 "2020-07-29T13:50:55Z")

</div>

I want to know if there is a way to add multiple choice selection as custom component ( checkbox ). I’m using [GitHub - botfront/rasa-webchat: A feature-rich chat widget for Rasa and Botfront](https://github.com/botfront/rasa-webchat) as front end.

---

<div class="post-metadata">

**Author:** ![koaning](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/koaning/32/6626_2.png) [@koaning](https://forum.rasa.com/u/koaning)\
**Post date:** [August 3, 2020, 8:03am UTC](https://forum.rasa.com/t/checkbox-as-custom-component/31981/2 "2020-08-03T08:03:02Z")

</div>

I’m not familiar with the webchat front-end framework, but I’m assuming you should be able to do it via custom actions. There’s more information in the [docs](https://rasa.com/docs/rasa/core/actions/) but we’ve also got a blogpost about it [here](https://blog.rasa.com/how-to-build-your-first-rasa-form/). They allow you to render buttons and that might facilitate your use-case.

---

<div class="post-metadata">

**Author:** ![nadachaabani1](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/nadachaabani1/32/5919_2.png) [@nadachaabani1](https://forum.rasa.com/u/nadachaabani1)\
**Post date:** [August 3, 2020, 9:25am UTC](https://forum.rasa.com/t/checkbox-as-custom-component/31981/3 "2020-08-03T09:25:18Z")

</div>

@koaning when we want to add a quick reply from custom action we can use:

```
org_list = [
 {
    'title': 'Target',
    'payload': '625'
 },
 {
    'title': 'Serenity',
    'payload': '548'
 },
 {
    'title': 'Energy group',
    'payload': '236'
 }
] 
dispatcher.utter_message( 
   text="please select one organisation", buttons=org_list
)

```

How can we achieve that when we want to add block containing checkboxes from custom actions ? with `text = "please select at least two organisations"`

---

<div class="post-metadata">

**Author:** ![koaning](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/koaning/32/6626_2.png) [@koaning](https://forum.rasa.com/u/koaning)\
**Post date:** [August 3, 2020, 10:48am UTC](https://forum.rasa.com/t/checkbox-as-custom-component/31981/4 "2020-08-03T10:48:31Z")

</div>

Ah now I see, you want to render checkboxes in the chat. As in; the user-interface element.

I’m going to have to quite [the documentation](https://rasa.com/docs/rasa/core/domains/#images-and-buttons) on this instance.

> Please keep in mind that it is up to the implementation of the output channel on how to display the defined buttons. The command line, for example, can’t display buttons or images, but tries to mimic them by printing the options.

Many channels don’t implement all possible user interface elements which is why we only support a limited set. You might instead make a custom form that first shows three options and after selecting one allows the user to select from the remaining two.
