I would like to use a form to validate a user’s email address.
Essentially, I just need to know whether they have clicked a certain link, but there’s no easy way (that I know of) to do that within Coda.
To circumvent that limitation, after my users submit their email address and form I could send them an email with a second form that they have to submit. If there were a way for me to track which user received which form link this would be easy. But I don’t know how to do that.
It’s a bit elaborate but you could do it with the API. Easiest is to use Google Apps Script.
Your doc would be something like this:
And then for the API part, check out the Getting Started Guide for how to generate an API key and set up a Google Apps Script, and then your Google Apps Script code would be something like this:
// Set up Coda info
CodaAPI.authenticate('<<yourAPIKeyHere>>');
var DOC_ID = '<<theIdOfYourDocHere>>';
var TABLE_ID = '<<theIdOfYourTableHere>>';
var COLUMN_ID = '<<idOfEmailValidatedCheckboxColumnHere>>';
// This function runs when someone visits the public script URL
function doGet(q) {
// Grab the rowId from the custom URL we sent the person to
var rowId = q.parameters.rowId;
// Log the validation in Coda
CodaAPI.updateRow(DOC_ID, TABLE_ID, rowId, {COLUMN_ID: "true"});
// Show success message
return HtmlService.createHtmlOutput('<html><body>Thank you for validating!</body></html>');
}
Not sure your experience level with this kind of thing, and whether the above sounds super easy or hopelessly daunting, but the API can be pretty handy for little extra pieces of functionality like this! Happy to help if you feel like giving it a try.