CMS Development

CEM-Andy
Participante

Creating a voting system

resolver

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)

0 Avaliação positiva
1 Solução aceita
Jake_Lett
Solução
Orientador(a) | Parceiro
Orientador(a) | Parceiro

Creating a voting system

resolver

@stefen wrote a helpful totorial on how to setup some php on a server to allow ajax calls on an API.

 

Other ideas:

Exibir solução no post original

5 Respostas 5
Jake_Lett
Solução
Orientador(a) | Parceiro
Orientador(a) | Parceiro

Creating a voting system

resolver

@stefen wrote a helpful totorial on how to setup some php on a server to allow ajax calls on an API.

 

Other ideas:

CEM-Andy
Participante

Creating a voting system

resolver

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

Jake_Lett
Orientador(a) | Parceiro
Orientador(a) | Parceiro

Creating a voting system

resolver

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

dennisedson
Equipe de Produto da HubSpot
Equipe de Produto da HubSpot

Creating a voting system

resolver

@Jake_Lett , 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 is an option, but for this, it might be overkill when considering the pricetag. 

CEM-Andy
Participante

Creating a voting system

resolver

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?