Skip to content

Instantly share code, notes, and snippets.

@jshakes
Last active January 30, 2024 14:59
Show Gist options
  • Save jshakes/d82d07584f458cbb5d30db1941afcdec to your computer and use it in GitHub Desktop.
Save jshakes/d82d07584f458cbb5d30db1941afcdec to your computer and use it in GitHub Desktop.
Additional Info Schema example - all questions
{
"questions": [
{
"question_uuid": "baby_supplies",
"label": "Number of Children Needing Baby Supplies",
"type": "number",
"default_value": 0,
"validations": [
{
"name": "min",
"argument": 0
},
{
"name": "max",
"argument": 11
}
]
},
{
"question_uuid": "dietary_preferences",
"label": "Dietary Preferences",
"type": "select_multiple",
"options": [
{
"value": "no_preferences",
"label": "No Preferences"
},
{
"value": "lactose_intolerance",
"label": "Lactose Intolerance"
},
{
"value": "gluten_intolerance",
"label": "Gluten Intolerance"
},
{
"value": "kosher",
"label": "Kosher"
},
{
"value": "halal",
"label": "Halal"
},
{
"value": "dairy_free",
"label": "Dairy free"
},
{
"value": "vegetarian",
"label": "Vegetarian"
},
{
"value": "vegan",
"label": "Vegan"
},
{
"value": "fodmap",
"label": "FODMAP"
},
{
"value": "nuts",
"label": "Tree nut and peanut allergies"
}
]
},
{
"question_uuid": "address",
"label": "Address",
"type": "address_us"
},
{
"question_uuid": "zip_code",
"label": "ZIP code",
"type": "number",
"validations": [
{
"name": "regex",
"argument": "/^[0-9]{5}$/",
"error_label": "Please enter a valid five character ZIP code"
}
]
},
{
"question_uuid": "birth_date",
"label": "Birthday",
"type": "date"
},
{
"question_uuid": "food_pickup",
"label": "Pickup Representative",
"type": "compound",
"questions": [
{
"question_uuid": "food_pickup_name",
"type": "text",
"label": "Full name"
},
{
"question_uuid": "food_pickup_name",
"type": "telephone_us",
"label": "Phone number"
}
]
},
{
"question_uuid": "emergency_contact",
"label": "Emergency Contact",
"type": "compound",
"questions": [
{
"question_uuid": "food_pickup_name",
"type": "text",
"label": "Full name"
},
{
"question_uuid": "food_pickup_name",
"type": "telephone_us",
"label": "Phone number"
}
]
},
{
"question_uuid": "needs_assistance",
"type": "boolean",
"label": "Special Circumstances (Needs Assistance)",
"default_value": false,
"hint": "Will you require special assistance for your visit?"
},
{
"question_uuid": "relationship_status",
"type": "select_one",
"label": "Relationship Status",
"options": [
{
"value": "single",
"label": "Single"
},
{
"value": "domestic_partner",
"label": "Domestic Partner"
},
{
"value": "common_law",
"label": "Common Law"
},
{
"value": "emancipated_minor",
"label": "Emancipated Minor"
},
{
"value": "married",
"label": "Married"
},
{
"value": "divorced",
"label": "Divorced"
},
{
"value": "separated",
"label": "Separated"
},
{
"value": "widowed",
"label": "Widowed"
}
]
},
{
"question_uuid": "ethnicity",
"type": "select_one",
"label": "Ethnicity",
"options": [
{
"value": "two_or_more_races",
"label": "Two or more races"
},
{
"value": "black",
"label": "Black (non-hispanic)"
},
{
"value": "white",
"label": "White (non-hispanic)"
},
{
"value": "hispanic_or_latino",
"label": "Hispanic or Latino"
},
{
"value": "asian_or_pacific",
"label": "Asian or Pacific Islander"
},
{
"value": "american_indian_or_alaskan",
"label": "American Indian or Alaskan"
},
{
"value": "other",
"label": "Other"
}
]
},
{
"question_uuid": "education",
"type": "select_one",
"label": "Highest Education Obtained",
"options": [
{
"value": "no_high_school",
"label": "No High School"
},
{
"value": "high_school_diploma",
"label": "High School diploma"
},
{
"value": "ged",
"label": "GED"
},
{
"value": "associate_or_bachelo",
"label": "Associate or Bachelors degree"
},
{
"value": "post_graduate",
"label": "Post-graduate studies"
}
]
},
{
"question_uuid": "housing",
"type": "select_one",
"label": "Housing Status",
"options": [
{
"value": "own",
"label": "Own"
},
{
"value": "room_in_apartment",
"label": "Room in apartment"
},
{
"value": "friends_or_family",
"label": "Friends or family"
},
{
"value": "regular_rent",
"label": "Regular rent"
},
{
"value": "subsidized_rent",
"label": "Subsidized Rent"
},
{
"value": "shelter",
"label": "Shelter"
},
{
"value": "homeless",
"label": "Homeless"
}
]
},
{
"question_uuid": "food_preparation",
"type": "boolean",
"label": "Can you prepare food?",
"hint": "Select yes only if you are able to prepare a meal using raw ingredients"
},
{
"question_uuid": "employment",
"type": "select_one",
"label": "Employment Status",
"options": [
{
"value": "full_time",
"label": "Full time"
},
{
"value": "part_time",
"label": "Part time"
},
{
"value": "unemployed",
"label": "Unemployed"
}
]
},
{
"question_uuid": "country_of_birth",
"label": "Country of Birth",
"type": "country"
},
{
"question_uuid": "gender",
"label": "Gender",
"type": "select_one",
"options": [
{
"value": "female",
"label": "Female"
},
{
"value": "male",
"label": "Male"
},
{
"value": "nonconf",
"label": "Gender Non-Conforming"
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment