# Getting user profile custom field via JS

**URL:** <https://meta.discourse.org/t/getting-user-profile-custom-field-via-js/32257>\
**Category:** Feature\
**Created:** [2015 年8 月 18 日 17:08 UTC](https://meta.discourse.org/t/getting-user-profile-custom-field-via-js/32257 "2015-08-18T17:08:54Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![Nuck](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nuck/32/121732_2.png) [@Nuck](https://meta.discourse.org/u/Nuck)\
**Post date:** [2016 年4 月 14 日 02:32 UTC](https://meta.discourse.org/t/getting-user-profile-custom-field-via-js/32257/11 "2016-04-14T02:32:13Z")

</div>

> [@eviltrout](#):
>
> It should definitely work if it’s public\_user\_custom\_fields – I know we’re using this feature on some plugins and the data is indeed being displayed properly

`public_user_custom_fields` in the admin panel, right? Not some setting elsewhere?

> [@eviltrout](#):
>
> Maybe try restarting your dev server? Does it appear in the JSON request?

I was actually developing against our staging server which rebuilds the docker every time so I’m certain it was restarted (and then some). I’ll look at the JSON request this weekend and see if I can pin this down.

> [@Falco](#):
>
> If you want a custom\_user\_field on the post object you can do this:

Wouldn’t this cause an N+1 query? Is there any solid documentation on the whole custom field system somewhere? I didn’t realize you could register the custom field type or append to `serialized_current_user_fields`

---

_[View the full topic](https://meta.discourse.org/t/getting-user-profile-custom-field-via-js/32257)._
