# JS bug: can't access property "value"

**URL:** <https://community.gravityforms.com/t/js-bug-cant-access-property-value/16612>\
**Category:** Get Help\
**Tags:** bug, javascript, merge-tags\
**Created:** [January 11, 2024, 10:22am UTC](https://community.gravityforms.com/t/js-bug-cant-access-property-value/16612 "2024-01-11T10:22:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![user5e450f3338f15917](https://avatars.discourse-cdn.com/v4/letter/u/e5b9ba/32.png) [@user5e450f3338f15917](https://community.gravityforms.com/u/user5e450f3338f15917)\
**Post date:** [January 11, 2024, 10:22am UTC](https://community.gravityforms.com/t/js-bug-cant-access-property-value/16612/1 "2024-01-11T10:22:43Z")

</div>

In `notification.php` on line 703 there’s this line: `var event = document.getElementById( 'event' ).value;`.

In some cases the result from `getElementById` is null and the resulting `value` property can’t be accessed. This results in merge tags not being displayed. It can be fixed by adding a value check like this:  
`var event = document.getElementById( 'event' ); event = event ? event.value : null;`

This bug is present in version 2.8.1.

---

<div class="post-metadata">

**Author:** ![richardw8k](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/richardw8k/32/2354_2.png) [@richardw8k](https://community.gravityforms.com/u/richardw8k)\
**Post date:** [January 11, 2024, 2:35pm UTC](https://community.gravityforms.com/t/js-bug-cant-access-property-value/16612/2 "2024-01-11T14:35:46Z")

</div>

To report a bug, please open a support ticket so it can be logged with the product team: [https://www.gravityforms.com/open-support-ticket/technical/](https://www.gravityforms.com/open-support-ticket/technical/)

---

<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:** [February 10, 2024, 2:35pm UTC](https://community.gravityforms.com/t/js-bug-cant-access-property-value/16612/3 "2024-02-10T14:35:50Z")

</div>

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