How to add vote or like the button to public airtable

Are you wondering about how to add a public vote/like the button to your Airtable base without the need of having a collaborator? If so, this article is for you. In this article, I will go over a public vote/like button mechanism in Airtable that will be very flexible and easy to modify. You can implement this idea of public voting or like in many different ways depending on your needs. For example, you can ask for feedback from your users or ask them which feature of your product or service they like the most, etc.

First let's understand my current base, that I am using for this article.

Let's start with the tables I have in my base:

  • Public opinions: The Public opinions table is used to share a link to anyone for a vote or like.
  • Votes: The Votes table is used to store the form responses, when the button is clicked from the shareable link

like button public like button in airtable public button in airtable public button public button without collaboratorslike button public like button in airtable public button in airtable public button public button without collaborators

  • Results: The Results table Is used for showing results, which is optional. You can omit this table.

like button public like button in airtable public button in airtable public button public button without collaborators

You need to create these tables, here we are using one table to share the link and another table to store the responses of public. As at last, we show them the results from the results table.

Understanding the Process

Here we share the link of the public opinions table. Everyone can vote or give a like from there. When someone clicks on either of the buttons, it redirects them to a form where the value is prefilled. When they submit the response, this response is saved in the Votes table. And based on the data form votes table, we are showing results in the results table.

Now Important things you need...

  • Table whose link you will share publicly - Public opinions table in this case.
  • Table to store responses - Votes table in this case.
  • Form view created for the table where you store response - Votes table form view in this case

Steps to follow

  • Create a table to save responses or public opinion. Now create a form view from the same table which is used to get responses from the button click. In our case, we have a votes table for it.
  • Now create a table that you would like to be shared with the public. In this table, you must have buttons for like or vote. In the buttons, you need to configure the 'Open URL' button and copy and paste the link of the form of the previously created table. If you want to set prefilled options/values, you need to add something in the URL in the following way:
  • Syntax: Link?prefill_column_name=value
  • Example: https://airtable.com/examplelink?prefill_Everyone%20Voted%20for=Focus%20on%20earth
  • There are a few things we should be aware of here. Firstly, this URL is encoded and you need to set values according to the buttons. For example, if the button says 'Yes' then at the end the value should be 'Yes' and if it says 'No', then the value should say 'No'. Also 'prefill_' is default and then your column name is attached.
  • Now the button configuration is done. You need to share the link of your public base which you can do by clicking on the 'Share View' option.
  • And that's all. You all are set. You can share the link and when people click on the button, they are redirected to a form where they will submit the response and you will have data on the other table.

Optional Implementation

  • If you want to show your user's results, then you need a Results table and you need to calculate the results from automation.
  • For example In my case, the automation is triggered when a new entry in the Votes table is created. Then it runs a script that iterates through the records and finds the winner and loser, storing the results in the Results table. I have also configured the form in a way where after submitting the form, you are redirected to the Results table to view your summary. To obtain that, you need a Results table as well as a shareable link which you need to set in the form you created for the table where you store the data.
  • If you want the script which I am using to calculate the results in my example, Click Here.
  • You can modify the script and put it in automation and trigger it whenever a new record is created in the table where we store the data, In my case, it is called the Votes table.
  • The image below shows the configuration for your automation.

like button public like button in airtable public button in airtable public button public button without collaborators

Feel free to contact me for a Free airtable consultation by Clicking Here.

monino solutions logo

COPYRIGHT © 2024 Monino Solutions.