# Creating a voting system

**URL:** <https://community.hubspot.com/t/creating-a-voting-system/38332>\
**Category:** CMS Development\
**Created:** [June 3, 2021, 10:08am UTC](https://community.hubspot.com/t/creating-a-voting-system/38332 "2021-06-03T10:08:05Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![CEM-Andy](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/cem-andy/32/60590_2.png) [@CEM-Andy](https://community.hubspot.com/u/CEM-Andy)\
**Post date:** [June 3, 2021, 10:08am UTC](https://community.hubspot.com/t/creating-a-voting-system/38332/1 "2021-06-03T10:08:05Z")

</div>

I’m new to hubspot and the system as a whole. We are currently running on the CMS Pro package and have been tasked to make a webpage that has a list of ‘ideas/comments’ which visitors will be able to click a button next to each one to ‘Up Vote’ the idea/comment. I need some help in how to get this started or what I need. For example, is this type of functionality even available on the CMS Pro package or do I need to upgrade to the Enterprise version?  
Basically what I think we need is the capability of when someone clicks on the button it will increment the up vote and add this new value to the hubdb database (as I believe the HubDB would be best to store the information). Can I do this within hubspot? Do I need to get another host that supports PHP/Node etc?  
I really just need some pointers for the best way to progress (as I dont really want to get the Enterprise if I dont even need it).

Thanks. (I hope that makes sense)

---

<div class="post-metadata">

**Author:** ![Jake\_Lett](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jake_lett/32/45178_2.png) [@Jake\_Lett](https://community.hubspot.com/u/Jake_Lett)\
**Post date:** [June 3, 2021, 1:13pm UTC](https://community.hubspot.com/t/creating-a-voting-system/38332/2 "2021-06-03T13:13:22Z")

</div>

I think you are on the right track and would have a column for “votes” for each row in a HubDB. You could then use the hubdb api to get the value and incremint one and then put the new value.

[https://legacydocs.hubspot.com/docs/methods/hubdb/v2/update\_cell](https://legacydocs.hubspot.com/docs/methods/hubdb/v2/update_cell)

---

<div class="post-metadata">

**Author:** ![CEM-Andy](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/cem-andy/32/60590_2.png) [@CEM-Andy](https://community.hubspot.com/u/CEM-Andy)\
**Post date:** [June 3, 2021, 1:51pm UTC](https://community.hubspot.com/t/creating-a-voting-system/38332/3 "2021-06-03T13:51:03Z")

</div>

Thanks for the reply,  
The HubDB API can be accessed with just the CMS Pro? or would I need CMS Enterprise to do this?  
Reading up on some of the documentation is confusing, as some say I need another server to handle the requests (via php) in order to hide the API Key etc. Or is there a way to do this through HubL?

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [June 3, 2021, 2:00pm UTC](https://community.hubspot.com/t/creating-a-voting-system/38332/4 "2021-06-03T14:00:39Z")

</div>

[@Jake\_Lett](https://community.hubspot.com/t5/user/viewprofilepage/user-id/72866) , I am with you in this is a good direction. The only problem is that you will need to auth in to work with HubDB and you do not want to expose your hapikey on the front end. @CEM-Andy , you are going to want to have some middleware to perform that transaction. Upgrading to Enterprise for [serverless functions](https://developers.hubspot.com/docs/cms/features/serverless-functions) is an option, but for this, it might be overkill when considering the pricetag.

---

<div class="post-metadata">

**Author:** ![Jake\_Lett](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jake_lett/32/45178_2.png) [@Jake\_Lett](https://community.hubspot.com/u/Jake_Lett)\
**Post date:** [June 4, 2021, 9:52am UTC](https://community.hubspot.com/t/creating-a-voting-system/38332/5 "2021-06-04T09:52:33Z")

</div>

@stefen wrote a [helpful totorial](https://www.kelp.agency/blog/how-to-enable-cors-ajax-requests-for-any-hubspot-api) on how to setup some php on a server to allow ajax calls on an API.

Other ideas:

- Using airtable or google sheets to store/update the data [https://airtable.com/api/meta](https://airtable.com/api/meta)
- Leverage social media widgets “vote with a like” “vote with a tweet” [https://developers.facebook.com/docs/plugins/like-button/](https://developers.facebook.com/docs/plugins/like-button/)

---

<div class="post-metadata">

**Author:** ![CEM-Andy](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/cem-andy/32/60590_2.png) [@CEM-Andy](https://community.hubspot.com/u/CEM-Andy)\
**Post date:** [June 4, 2021, 10:16am UTC](https://community.hubspot.com/t/creating-a-voting-system/38332/6 "2021-06-04T10:16:26Z")

</div>

Thankyou for this information, I’ll take a look deeper into these also.
