This is the registration form that was used for Epoch!
- Clone the repository and enter it
git clone https://github.com/hackclub/epoch-register.git
cd epoch-register
- Install packages
yarn
or
npm install
-
Change questions to your liking Locate
lib/manifest.jsonand edit/add/remove questions to your liking. For more information aboutmanifest.json, click here -
Add environment variables and customize Add a
.envfile with your AirTable API key. How do I get my API key? Locatelib/airtable.jsand change theregistrationsAirtablebaseID to your Airtable base ID, which is found in your Airtable URL and usually starts withapp. -
Add necessary fields to Airtable Create a new table called
Registrations.
Add fields/columns with names that match up with thekeyvalue for each question inmanifest.json. Make sure the column type matches up with question type inmanifest.json -
Run
yarn dev
or
npm run dev
Manifest is composed of an array called questions with each element inside the array representing a section of the form.
header string is the header that is displayed at the top of the section.
items Array<Question> is an array that contains the questions.
key string REQUIRED must match the name of an Airtable column in Registrations
label string is what is shown to the user
sublabel string is a secondary label/description of the field
type string REQUIRED determines what type of input field the user will see.
string input
paragraph textarea
checkbox checkbox
select select
inputType string specifies validation with type=VALUE
email email validation
placeholder string is a placeholder
options Array<string> is used when select is specified as a input type
optional boolean determines if the input field is optional
check function(data)
data is an object that contains all the other question values. Ex. data["Travel Stipends"] pulls the value of the question with "Travel Stipends" as the key.