# Gray out or disable specific checkbox

**URL:** <https://community.gravityforms.com/t/gray-out-or-disable-specific-checkbox/17011>\
**Category:** Get Help\
**Tags:** disabled, checkboxes, gravity-wiz\
**Created:** [March 7, 2024, 2:53pm UTC](https://community.gravityforms.com/t/gray-out-or-disable-specific-checkbox/17011 "2024-03-07T14:53:40Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![user5a2a557eb88db6.5](https://avatars.discourse-cdn.com/v4/letter/u/ac8455/32.png) [@user5a2a557eb88db6.5](https://community.gravityforms.com/u/user5a2a557eb88db6.5)\
**Post date:** [March 7, 2024, 2:53pm UTC](https://community.gravityforms.com/t/gray-out-or-disable-specific-checkbox/17011/1 "2024-03-07T14:53:40Z")

</div>

I have a checkbox field with a list of dates for classes that people would like to RSVP for. They check the box for each date that they are interested in. As each date passes, I’d like to keep them in the checkbox list, but disable the user from selecting them. Is there a way to gray out or disable individual checkboxes and keep others active?

The checkboxes aren’t strictly dates… they’re text with the date, workshop title and presenter name. (checkbox label = “22/03/24 : Laying the foundations for healthy self-esteem and assertiveness!”).

---

<div class="post-metadata">

**Author:** ![chrishajer](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/chrishajer/32/88_2.png) [@chrishajer](https://community.gravityforms.com/u/chrishajer)\
**Post date:** [March 7, 2024, 4:04pm UTC](https://community.gravityforms.com/t/gray-out-or-disable-specific-checkbox/17011/2 "2024-03-07T16:04:08Z")

</div>

Hi Christos. Check out this add-on from Gravity Wiz:

> **[Gravity Forms Limit Choices](https://gravitywiz.com/documentation/gravity-forms-limit-choices/)**
>
> Gravity Forms Limit Choices is a plugin that allows you to limit how many times each choice on a multi-choice field may be selected.

---

<div class="post-metadata">

**Author:** ![user5a2a557eb88db6.5](https://avatars.discourse-cdn.com/v4/letter/u/ac8455/32.png) [@user5a2a557eb88db6.5](https://community.gravityforms.com/u/user5a2a557eb88db6.5)\
**Post date:** [March 7, 2024, 4:30pm UTC](https://community.gravityforms.com/t/gray-out-or-disable-specific-checkbox/17011/3 "2024-03-07T16:30:24Z")

</div>

Thanks Chris but this is different, i do not want to have limit, i want to disable the options with past date.

---

<div class="post-metadata">

**Author:** ![chrishajer](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/chrishajer/32/88_2.png) [@chrishajer](https://community.gravityforms.com/u/chrishajer)\
**Post date:** [March 7, 2024, 4:32pm UTC](https://community.gravityforms.com/t/gray-out-or-disable-specific-checkbox/17011/4 "2024-03-07T16:32:46Z")

</div>

I see. That plugin will not help with that. I don’t see a way other than custom code that runs before the form is shown, checks the current date and the date of that option, and then applies JavaScript and/or CSS to make the option unselectable. I don’t know of a plugin that will do that.

---

<div class="post-metadata">

**Author:** ![user5a2a557eb88db6.5](https://avatars.discourse-cdn.com/v4/letter/u/ac8455/32.png) [@user5a2a557eb88db6.5](https://community.gravityforms.com/u/user5a2a557eb88db6.5)\
**Post date:** [March 8, 2024, 1:12pm UTC](https://community.gravityforms.com/t/gray-out-or-disable-specific-checkbox/17011/5 "2024-03-08T13:12:37Z")

</div>

Thanks, I wrote here, if anybody from the community know how to do that 🙂

---

<div class="post-metadata">

**Author:** ![scott-the-sorceror](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/scott-the-sorceror/32/2772_2.png) [@scott-the-sorceror](https://community.gravityforms.com/u/scott-the-sorceror)\
**Post date:** [March 8, 2024, 3:36pm UTC](https://community.gravityforms.com/t/gray-out-or-disable-specific-checkbox/17011/6 "2024-03-08T15:36:53Z")

</div>

Not an exact solution, but we wrote a snippet that does this for time-sensitive choices. You could use that as a starting point to write one that works with date strings.

If you’re a Gravity Perks customer, we could look into making these modifications for you. [Drop us a line](https://gravitywiz.com/support).

> <https://github.com/gravitywiz/snippet-library/blob/master/gravity-forms/gw-time-sensitive-choices.php>

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/gravityforms1/original/2X/f/fef63f0599c45e0218c30d9f5d7ca8bff9b00189.png) [@system](https://community.gravityforms.com/u/system)\
**Post date:** [April 7, 2024, 3:37pm UTC](https://community.gravityforms.com/t/gray-out-or-disable-specific-checkbox/17011/7 "2024-04-07T15:37:45Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
