Airtable Emoji Poll

Developer
Size
3,194 Kb
Views
22,264

How do I make an airtable emoji poll?

What is a airtable emoji poll? How do you make a airtable emoji poll? This script and codes were developed by Chris Coyier on 27 December 2022, Tuesday.

Airtable Emoji Poll Previews

Airtable Emoji Poll - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Airtable Emoji Poll</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <form action="#0" id="voting-form" class="voting-form"> <h1>Which of these emojis is your favorite?</h1> <div> <select name="emoji_choice" id="emoji_choice"> <option value="

Airtable Emoji Poll - Script Codes CSS Codes

body { font-family: Sans-Serif; margin: 0;
}
h1, h2 { font-size: 20px;
}
.voting-form { background: #eee; padding: 20px; margin: 0 0 20px 0;
}
select { width: 200px; text-align: center;
}
.chart { padding: 20px;
}
.chart div { font-size: 20px; text-align: right; padding: 5px; margin: 0 0 3px 0; color: white;
}
.chart div:nth-of-type(1) { background-color: #FDBE1A;
}
.chart div:nth-of-type(2) { background-color: #F2B6A0;
}
.chart div:nth-of-type(3) { background-color: #FFD85A;
}
.chart div:nth-of-type(4) { background-color: #830C07;
}
.chart div:nth-of-type(5) { background-color: #999999;
}

Airtable Emoji Poll - Script Codes JS Codes

console.clear();
// sort with _createdTime ??
var airtable_read_endpoint = "https://api.airtable.com/v0/appnPiAF5nEI3Lu1a/all_poll_data?maxRecords=100&view=poll_data&api_key=keyU4jNgidjWREljE&sortField=_createdTime&sortDirection=desc";
var airtable_write_endpoint = "https://api.airtable.com/v0/appnPiAF5nEI3Lu1a/all_poll_data?api_key=keyU4jNgidjWREljE";
// Write API
var form = document.querySelector("#voting-form");
var select = document.querySelector("#emoji_choice");
form.addEventListener("submit", function(event) { event.preventDefault(); axios.post(airtable_write_endpoint, { "fields": { "Emoji Choice": select.options[select.selectedIndex].value } }) .then(function(response) { // give it a little bit for data to hit AirTable setTimeout(function() { getDataAndBuild(); }, 750); })
});
var pollData = {};
var chartData = [];
function getDataAndBuild() { // zero out data pollData = { "
Airtable Emoji Poll - Script Codes
Airtable Emoji Poll - Script Codes
Home Page Home
Developer Chris Coyier
Username chriscoyier
Uploaded December 27, 2022
Rating 3.5
Size 3,194 Kb
Views 22,264
Do you need developer help for Airtable Emoji Poll?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Chris Coyier (chriscoyier) Script Codes
Create amazing love letters with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!