# Poll-restriction

**URL:** https://meta.discourse.org/t/poll-restriction/264051
**Category:** Support
**Tags:** groups, polls
**Created:** [May 6, 2023, 7:07am UTC](https://meta.discourse.org/t/poll-restriction/264051 "2023-05-06T07:07:50Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Toby\_Richards](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/toby_richards/32/294369_2.png) [@Toby\_Richards](https://meta.discourse.org/u/Toby_Richards)
#### Post date: [May 6, 2023, 7:07am UTC](https://meta.discourse.org/t/poll-restriction/264051/1 "2023-05-06T07:07:50Z")

</div>

I have a category where it is visible for everyone but only one group can create topics and reply.

When I create a poll, the public is still able to vote but when they click they get an error message.

 ![Screenshot_2023-05-06-08-46-55-572-edit_com.android.chrome](https://global.discourse-cdn.com/meta/original/4X/4/d/4/4d4f830bae2d7653574e5773de8f5923088a3846.jpeg)

So my question is:

Is it possible to have a poll restricted to only members of the group it is posted in filled automatically? The category is restricted to that group regarding participation. I want to avoid to manually to do those setting.

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [June 8, 2023, 6:17am UTC](https://meta.discourse.org/t/poll-restriction/264051/2 "2023-06-08T06:17:42Z")

</div>

I don’t think there’s a way to do this through the UI, but I’ve had some success on another site using a poll template with the specifics in that I use in each case that I can then just copy/paste in and manually tweak in the composer. Something like:

```plaintext
[poll type=regular results=on_vote public=true chartType=bar groups=team]
# **Bold Title**
* option one
* option two
* option three
[/poll]

```

You could also use the [Templates](https://meta.discourse.org/t/discourse-templates/229250) plugin to make it even handier.

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [June 8, 2023, 2:23pm UTC](https://meta.discourse.org/t/poll-restriction/264051/3 "2023-06-08T14:23:10Z")

</div>

Alternatively, if your categories’ security settings aren’t going to change over time, you could create a JS script that returns the current category, and accordingly changes the poll’s default settings following this example:

[https://meta.discourse.org/t/changing-the-default-settings-when-users-build-polls/220022/10?u=canapin](https://meta.discourse.org/t/changing-the-default-settings-when-users-build-polls/220022/10)
