# Getting joined data for widget scope

**URL:** https://meta.discourse.org/t/getting-joined-data-for-widget-scope/42264
**Category:** Development
**Created:** [April 8, 2016, 10:00pm UTC](https://meta.discourse.org/t/getting-joined-data-for-widget-scope/42264 "2016-04-08T22:00:01Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [April 11, 2016, 5:59pm UTC](https://meta.discourse.org/t/getting-joined-data-for-widget-scope/42264/3 "2016-04-11T17:59:19Z")

</div>

The `poster-name` widget has access to the entire post as `attrs`. If you want to attach a new widget within it, you can just pass along `attrs` and get access to everything.

Custom fields in particular are quite commonly needed in plugin widgets, so you can just access them like `attrs.userCustomFields.

Remember to make sure you whitelist the custom field if you want it accessible in your plugin:

```ruby
whitelist_staff_user_custom_field('your_field_name')

```

If you want to see how we use it, the [staff notes plugin](https://github.com/discourse/discourse-staff-notes) uses user custom fields and extends widgets.

---

_[View the full topic](https://meta.discourse.org/t/getting-joined-data-for-widget-scope/42264)._
