# Default option in select field is not working

**URL:** <https://community.prismic.io/t/default-option-in-select-field-is-not-working/9936>\
**Category:** Developing with Prismic\
**Tags:** slice-machine\
**Created:** [May 2, 2022, 5:14pm UTC](https://community.prismic.io/t/default-option-in-select-field-is-not-working/9936 "2022-05-02T17:14:50Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![kris](https://avatars.discourse-cdn.com/v4/letter/k/82dd89/32.png) [@kris](https://community.prismic.io/u/kris)\
**Post date:** [May 2, 2022, 5:14pm UTC](https://community.prismic.io/t/default-option-in-select-field-is-not-working/9936/1 "2022-05-02T17:14:50Z")

</div>

Hello,

I have a background select field with two options - white and dark. The "white" option is the default one.

I expect that if I don't touch the field within the Prismic writing room, it would be "white" by default. However, this is not the case - instead it outputs as "undefined". Only when I go to the dashboard, open the dropdown, select "dark", then back to "white", it renders the correct value.

The "undefined" value impacts the UI of my app so it's crucial for the default value to be "white"

---

<div class="post-metadata">

**Author:** ![Pau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/pau/32/5422_2.png) [@Pau](https://community.prismic.io/u/Pau)\
**Post date:** [May 3, 2022, 1:06am UTC](https://community.prismic.io/t/default-option-in-select-field-is-not-working/9936/3 "2022-05-03T01:06:18Z")

</div>

Hello @kris, thanks for reaching out.

I believe this is because pushing Custom Type changes to your repository won't trigger an update inside the documents. If the document already existed and you add a new field, you need to perform a change inside of it to see the default field reflected.

These changes should be manual, so there are no unexpected document changes, redeploys, webhooks being fired, etc. An editor always triggers changes.

---

<div class="post-metadata">

**Author:** ![kris](https://avatars.discourse-cdn.com/v4/letter/k/82dd89/32.png) [@kris](https://community.prismic.io/u/kris)\
**Post date:** [May 3, 2022, 6:29am UTC](https://community.prismic.io/t/default-option-in-select-field-is-not-working/9936/4 "2022-05-03T06:29:38Z")

</div>

@Pau This is happening to documents who already have had this field and I haven't made any changes to the custom type. Two case scenarios

1. I create a new document with a slice that has this field
2. I update an already existing document with the new slice

---

<div class="post-metadata">

**Author:** ![kris](https://avatars.discourse-cdn.com/v4/letter/k/82dd89/32.png) [@kris](https://community.prismic.io/u/kris)\
**Post date:** [May 3, 2022, 10:35pm UTC](https://community.prismic.io/t/default-option-in-select-field-is-not-working/9936/5 "2022-05-03T22:35:27Z")

</div>

@Pau I just tested it further and it seems to be happening only if the select field is in a slice. If it's in the static zone, it's rendered correctly from the start without manually having to change the field in order for it to take effect.

---

<div class="post-metadata">

**Author:** ![Pau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/pau/32/5422_2.png) [@Pau](https://community.prismic.io/u/Pau)\
**Post date:** [May 4, 2022, 3:07am UTC](https://community.prismic.io/t/default-option-in-select-field-is-not-working/9936/6 "2022-05-04T03:07:48Z")

</div>

Hey @kris, Thanks a lot for the additional information. We'll run a test on our end and open an issue in our backlog when we're able to reproduce it.

---

<div class="post-metadata">

**Author:** ![kris](https://avatars.discourse-cdn.com/v4/letter/k/82dd89/32.png) [@kris](https://community.prismic.io/u/kris)\
**Post date:** [May 6, 2022, 10:43am UTC](https://community.prismic.io/t/default-option-in-select-field-is-not-working/9936/7 "2022-05-06T10:43:07Z")

</div>

@Pau I just noticed that the same thing is happening with Boolean fields.

I need to manually change the field back and forward in order for the field to be updated.

I'd consider this a critical bug as it says one thing within the Prismic writing room while the API delivers another information. Content writers can be confused by it

---

<div class="post-metadata">

**Author:** ![Pau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/pau/32/5422_2.png) [@Pau](https://community.prismic.io/u/Pau)\
**Post date:** [May 10, 2022, 4:53am UTC](https://community.prismic.io/t/default-option-in-select-field-is-not-working/9936/8 "2022-05-10T04:53:46Z")

</div>

I understand, thanks for sharing this additional info.  
I'll add it to the same ticket.  
Whenever we have an update we'll update this same thread.

Thanks

---

<div class="post-metadata">

**Author:** ![will](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/will/32/8917_2.png) [@will](https://community.prismic.io/u/will)\
**Post date:** [May 23, 2022, 3:07pm UTC](https://community.prismic.io/t/default-option-in-select-field-is-not-working/9936/10 "2022-05-23T15:07:55Z")

</div>

Hey @Pau We're seeing this issue too, any updates on this one? Thanks

---

<div class="post-metadata">

**Author:** ![Pau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/pau/32/5422_2.png) [@Pau](https://community.prismic.io/u/Pau)\
**Post date:** [May 24, 2022, 9:30am UTC](https://community.prismic.io/t/default-option-in-select-field-is-not-working/9936/13 "2022-05-24T09:30:17Z")

</div>

Hello, @will  
There is no news at the moment.  
We'll post an update whenever there is.

Thanks

---

<div class="post-metadata">

**Author:** ![kris](https://avatars.discourse-cdn.com/v4/letter/k/82dd89/32.png) [@kris](https://community.prismic.io/u/kris)\
**Post date:** [June 8, 2022, 12:02pm UTC](https://community.prismic.io/t/default-option-in-select-field-is-not-working/9936/15 "2022-06-08T12:02:32Z")

</div>

@Pau Are there any updates on this? I reported this bug over a month ago but unfortunately it's still a production bug that impact real websites. It showcases different values in the content room and the API. This confuses not only the content person, but also me as a developer. But it also impacts the slices themselves, as I haven't (and shouldn't since it has a default value) accounted for "undefined" value

---

<div class="post-metadata">

**Author:** ![Priyanka](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/priyanka/32/3223_2.png) [@Priyanka](https://community.prismic.io/u/Priyanka)\
**Post date:** [June 9, 2022, 8:56am UTC](https://community.prismic.io/t/default-option-in-select-field-is-not-working/9936/16 "2022-06-09T08:56:18Z")

</div>

Hello @kris, we don't have any news just yet, sorry for the inconvenience. We will come back to you as we get any updates.

Thanks,  
Priyanka

---

<div class="post-metadata">

**Author:** ![dan.duett](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/dan.duett/32/3309_2.png) [@dan.duett](https://community.prismic.io/u/dan.duett)\
**Post date:** [June 16, 2022, 4:24pm UTC](https://community.prismic.io/t/default-option-in-select-field-is-not-working/9936/19 "2022-06-16T16:24:10Z")

</div>

Jumping on this thread to report the same issue for our team at [Arcadia.com](http://Arcadia.com).

At the Prismic team's encouragement, we took a leap of faith with Slice Machine, but bugs like this make it hard to get and maintain buy-in from content teams as well as the developers who support them.

---

<div class="post-metadata">

**Author:** ![Priyanka](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/priyanka/32/3223_2.png) [@Priyanka](https://community.prismic.io/u/Priyanka)\
**Post date:** [June 17, 2022, 5:39am UTC](https://community.prismic.io/t/default-option-in-select-field-is-not-working/9936/20 "2022-06-17T05:39:36Z")

</div>

Hello @dan.duett

I agree the bug is crucial and needs improvement. Our team is continuously working on improving SM for a better developer and content editor experience. I'll share your feedback with them.

Thanks,  
Priyanka

---

<div class="post-metadata">

**Author:** ![jerry.nummi](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/jerry.nummi/32/197_2.png) [@jerry.nummi](https://community.prismic.io/u/jerry.nummi)\
**Post date:** [July 23, 2022, 11:34pm UTC](https://community.prismic.io/t/default-option-in-select-field-is-not-working/9936/23 "2022-07-23T23:34:58Z")

</div>

Jumping on as well. Getting unexpected `null` values from booleans and selects adds complexity all over our code.

---

<div class="post-metadata">

**Author:** ![Pau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/pau/32/5422_2.png) [@Pau](https://community.prismic.io/u/Pau)\
**Post date:** [July 25, 2022, 9:45pm UTC](https://community.prismic.io/t/default-option-in-select-field-is-not-working/9936/24 "2022-07-25T21:45:51Z")

</div>

@jerry.nummi which version of Slice Machine are you using?

---

<div class="post-metadata">

**Author:** ![jerry.nummi](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/jerry.nummi/32/197_2.png) [@jerry.nummi](https://community.prismic.io/u/jerry.nummi)\
**Post date:** [July 26, 2022, 4:09am UTC](https://community.prismic.io/t/default-option-in-select-field-is-not-working/9936/26 "2022-07-26T04:09:54Z")

</div>

`0.4.1`

---

<div class="post-metadata">

**Author:** ![Pau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/pau/32/5422_2.png) [@Pau](https://community.prismic.io/u/Pau)\
**Post date:** [July 28, 2022, 7:33pm UTC](https://community.prismic.io/t/default-option-in-select-field-is-not-working/9936/27 "2022-07-28T19:33:26Z")

</div>

Thanks @jerry.nummi, I can confirm this issue is still on the backlog.  
We'll update this thread whenever there's news.

---

<div class="post-metadata">

**Author:** ![alws](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/alws/32/160_2.png) [@alws](https://community.prismic.io/u/alws)\
**Post date:** [August 2, 2022, 1:22pm UTC](https://community.prismic.io/t/default-option-in-select-field-is-not-working/9936/30 "2022-08-02T13:22:44Z")

</div>

Hello,

Quick update, I worked on a fix today, I’ll make sure to release it this week, I’ll keep you guys informed here.

---

<div class="post-metadata">

**Author:** ![alws](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/alws/32/160_2.png) [@alws](https://community.prismic.io/u/alws)\
**Post date:** [August 2, 2022, 3:17pm UTC](https://community.prismic.io/t/default-option-in-select-field-is-not-working/9936/31 "2022-08-02T15:17:18Z")

</div>

It’s now partially deployed on production, please contact me in private message so we can activate the fix on your repository and make sure it runs smoothly for you guys @will @jerry.nummi @dan.duett @kris

Arnaud.

---

<div class="post-metadata">

**Author:** ![alws](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/alws/32/160_2.png) [@alws](https://community.prismic.io/u/alws)\
**Post date:** [August 3, 2022, 1:01pm UTC](https://community.prismic.io/t/default-option-in-select-field-is-not-working/9936/32 "2022-08-03T13:01:14Z")

</div>



[Next page](https://community.prismic.io/t/default-option-in-select-field-is-not-working/9936.md?page=2)
