

import ContactForm from '$lib/contact-form.svelte' Welcome to SvelteKit Home page ( src/routes/index.svelte) at the moment I’ll add it there. Now I import the form for use in the project now, as there’s only a In the contact form component I’ll create a simple form first, I’ll # create the Svelte component file touch src/lib/contact-form.svelte The terminal: # create the directory/folder mkdir src/lib I’ll create the lib folder and the contact-form.svelte file via Set up Svelte formįor the contact form I’ll make a Svelte component, that can be usedĪnywhere in the project so I’m not bound to having it in one place You can add or remove any additional fields you want to store inĪirtable, you do you 😊. In my example I’ll add the following fields by renaming them andĬhanging the types with the ‘Customize field type’ option. I can now go through the fields on thereĪnd customise each field type by clicking on the small down arrow next Clicking ‘Add a base’ gives me the following screen:įrom here I’ll rename the ‘Untitled Base’ to contact-requests and Prompted to give it a name I’ll call it form-submissions, then I can CLick that and select ‘Create workspace’, I’ll be I’ll scroll to the bottom of the page and there’s a ’+ Add a If you don’t have an Airtable account you can So, Airtable is like a hosted version of MS Excel, simply put, it’s aĭatabase with a nice UI. Ok, now I have the project set up I can go about getting the backend I use pnpm so will be using that in the terminal examples, you can Then I’ll follow the rest of the steps from the CLI output: Next steps:ġ: cd svelte-and-airtable-contact-form-exampleģ: git init & git add -A & git commit -m "Initial commit" # (optional) ✔ Add Playwright for browser testing? … No
#Airtable api return without id or date code
✔ Add Prettier for code formatting? … Yes I’ll select the following options from the CLI: ✔ Which Svelte app template? › Skeleton project npm init svelte-and-airtable-contact-form-example I’ll start with creating a new project in SvelteKit. What you need from this example into your own project. I’ll be doing this from scratch so you can follow along then implement

Ok, preamble done let’s get to the actual content! Create the project My email address to my website but some people prefer to contact you On your site (great explanation! Right? 😂). Your site is a great way to get people to get in touch with you whilst So, time for the standard preamble of the reasoning behind why aĬontact form on your site is a good thing Having a contact form on There's a more up to date post on using personal access tokens If you want to enhance your Airtable API, check out the Micro Airtable API library on Github.This post uses the legacy API keys used for Airtable,
