# Checkbox widget is not working as expected

**URL:** https://community.forestadmin.com/t/checkbox-widget-is-not-working-as-expected/4167
**Category:** Help me!
**Tags:** howtos
**Created:** [February 6, 2022, 9:32am UTC](https://community.forestadmin.com/t/checkbox-widget-is-not-working-as-expected/4167 "2022-02-06T09:32:55Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Yusra\_Bagosher](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/yusra_bagosher/32/2600_2.png) [@Yusra\_Bagosher](https://community.forestadmin.com/u/Yusra_Bagosher)
#### Post date: [February 6, 2022, 9:32am UTC](https://community.forestadmin.com/t/checkbox-widget-is-not-working-as-expected/4167/1 "2022-02-06T09:32:55Z")

</div>

Hi there!

We have a smart action with a list of checkboxes that have been working fine since we introduced it months ago. This morning, the checkbox widget on the smart action has disappeared and is now a text box causing inconvenience to our content team.

The source code has not been changed from our side in the last 2 weeks and the GET API connected to the smart action is working as expected.

**Summary of the issue**  **- Expected behavior**

1. Open **Add amenities** smart action

2. Smart action form rendering all our amenities as checkboxes for agents to select (as seen below)

3. Agent selects amenities and saves.

 ![Screen Shot 2022-02-06 at 1.23.21 PM](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/2/2d6596831bb05e43da58cd6126146a02de8c0389.jpeg)

**Actual Behavior - from this morning:**

1. Open **Add amenities** smart action

2. Agent is only able to type amenities in a text box. It’s not even a **Belongs to Typeahead, Belongs to Select or Dropdown widgets** as seen in the screenshot below

 ![Screen Shot 2022-02-06 at 1.21.31 PM](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/4/4ad1dd6d87c8763868399d8b6e1432b540f0c163.png)

We have found that if we refresh 2-3x then the checkboxes appear again. FYR the below attached video - _note I’ve excluded the first 2 refresh attempts to reduce file size._

![Forest Admin ‣ Data ‣ Units (5)](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/d/dfbd56bba8ab35ddb1bdbe05fc8dc4e2baf53bdf.gif)

---

<div class="post-metadata">

### Author: ![Arnaud\_Moncel](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/arnaud_moncel/32/24_2.png) [@Arnaud\_Moncel](https://community.forestadmin.com/u/Arnaud_Moncel)
#### Post date: [February 7, 2022, 8:33am UTC](https://community.forestadmin.com/t/checkbox-widget-is-not-working-as-expected/4167/2 "2022-02-07T08:33:31Z")

</div>

Hi @Yusra_Bagosher 👋 Have you got any errors logs on your browser console when the checkboxes disappear?

---

<div class="post-metadata">

### Author: ![SivaKumarTukanti](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/sivakumartukanti/32/4024_2.png) [@SivaKumarTukanti](https://community.forestadmin.com/u/SivaKumarTukanti)
#### Post date: [February 8, 2022, 10:17am UTC](https://community.forestadmin.com/t/checkbox-widget-is-not-working-as-expected/4167/3 "2022-02-08T10:17:49Z")

</div>

@Arnaud_Moncel we didn’t seen any suspected error in browser console.

---

<div class="post-metadata">

### Author: ![Arnaud\_Moncel](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/arnaud_moncel/32/24_2.png) [@Arnaud\_Moncel](https://community.forestadmin.com/u/Arnaud_Moncel)
#### Post date: [February 8, 2022, 10:29am UTC](https://community.forestadmin.com/t/checkbox-widget-is-not-working-as-expected/4167/4 "2022-02-08T10:29:37Z")

</div>

Hi @SivaKumarTukanti 👋 welcome to our community.  
In order to see what happen, can you give us your project Name please 🙏

EDIT: can you share the smart action code please?

---

<div class="post-metadata">

### Author: ![Sivakumar\_Tukanti](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/sivakumar_tukanti/32/2931_2.png) [@Sivakumar\_Tukanti](https://community.forestadmin.com/u/Sivakumar_Tukanti)
#### Post date: [February 8, 2022, 10:42am UTC](https://community.forestadmin.com/t/checkbox-widget-is-not-working-as-expected/4167/5 "2022-02-08T10:42:29Z")

</div>

project name : Chalet+

**Smart Action :** : same code is working as expected before , there is no new changes done on this .

```javascript
const addAmenitiesAction = {
  name: 'Add Amenities',
  type: 'single',
  endpoint: '/forest/actions/add-amenities',
  fields: [
    {
      field: 'Amenities',
      type: ['Enums'],
      enums: ['None'],
      widget: 'checkboxes',
    },
    {
      field: 'Agent',
      reference: 'c2CUser.userIdKey',
      widget: 'belongsto dropDown',
      isRequired: true,
    },
  ],
  hooks: {
    load: async ({ fields, request }) => {
      const amenities = await getAminities();

      const amenitiesValues = amenities.map((amenity) => {
        return amenity.nameEn;
      });

      fields.Amenities.enums = amenitiesValues;

      return fields;
    },
  },
};

```

---

<div class="post-metadata">

### Author: ![Arnaud\_Moncel](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/arnaud_moncel/32/24_2.png) [@Arnaud\_Moncel](https://community.forestadmin.com/u/Arnaud_Moncel)
#### Post date: [February 8, 2022, 11:16am UTC](https://community.forestadmin.com/t/checkbox-widget-is-not-working-as-expected/4167/6 "2022-02-08T11:16:39Z")

</div>

I see two error in your code:

- inside the `Amenties` field  
`type: ['Enums']` =\> `type: ['Enum']`
- inside the `Agent` field  
`widget: 'belongsto dropDown'` =\> `widget: 'belongsto dropdown'`

Let me know
