# How to keep state of custom field in panel after page reload

**URL:** <https://forum.getkirby.com/t/how-to-keep-state-of-custom-field-in-panel-after-page-reload/4576>\
**Category:** Questions\
**Tags:** v2\
**Created:** [June 30, 2016, 9:29pm UTC](https://forum.getkirby.com/t/how-to-keep-state-of-custom-field-in-panel-after-page-reload/4576 "2016-06-30T21:29:28Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![jenstornell](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jenstornell/32/546_2.png) [@jenstornell](https://forum.getkirby.com/u/jenstornell)\
**Post date:** [July 1, 2016, 5:54am UTC](https://forum.getkirby.com/t/how-to-keep-state-of-custom-field-in-panel-after-page-reload/4576/3 "2016-07-01T05:54:33Z")

</div>

Does this help?

> [@Panel field javascript click does not work after save](https://forum.getkirby.com/t/panel-field-javascript-click-does-not-work-after-save/3474/7):
>
> So far there’s no complete or loaded event, but we can easily add this. The correct way to handle this so far is to create a jquery field plugin. A jQuery field plugin is easy to create. Here’s a boilerplate: [https://gist.github.com/bastianallgeier/9398bbd72dcc782827a8](https://gist.github.com/bastianallgeier/9398bbd72dcc782827a8) So this will take care of cleanly initiating the js code for every field instance and get the events right. In your PHP field class, you can then activate the jQuery plugin for the field like this: public function element() …

---

_[View the full topic](https://forum.getkirby.com/t/how-to-keep-state-of-custom-field-in-panel-after-page-reload/4576)._
