Hiring Partners
Segilola Resources Operating LimitedTaviatech TechnologiesFCMBMTN NigeriaAdvans La Fayette Microfinance BankAboki AfricaFirst Bank of NigeriaOPay
โ† Certified GeoServer/KoboToolbox User Level Two ยท Lesson 4 of 8

Module Three

๐Ÿ“– Every lesson in this course is free to read right here, no account needed. Create a free account to track your progress, take the exam, and earn your certificate.
4
Module 3: KoboToolbox Advanced Forms & Logic for Young Explorers
โญ Module 3 ยท Level Two

Smart Forms &
Field Data Magic

๐Ÿ“ฑ Build surveys that think for themselves

๐ŸŽฏ What you'll learn in this module

  • โœ” How to write XLSForm syntax like a pro โ€” constraints, relevance, and calculations
  • โœ” How to make dynamic choice filters and cascading selects (like "pick a country, then a city")
  • โœ” How to use repeat groups to collect multiple entries (e.g., all your pets!)
  • โœ” How to version your forms without losing old data
  • โœ” How to validate answers with regular expressions (fancy patternโ€‘matching)
  • โœ” How to pull choices from an external CSV file
๐Ÿ“
XLSForm: The Secret Formula Language

You already know basic forms. Now it's time to make them smart. In XLSForm, three superpowers change everything:

Constraints stop bad answers (e.g., age must be between 5 and 99). Relevance hides questions that don't apply (e.g., "What's your dog's name?" only shows if you said you have a dog). Calculations do math automatically (e.g., total = price ร— quantity).

๐Ÿง  Constraints are rules. Relevance is common sense. Calculations are a builtโ€‘in calculator.
๐Ÿ”—
Cascading Selects: Choose a Country, Then a City

Ever filled a form where you pick "Africa," then only African countries show up? That's a cascading select. In XLSForm, you use choice_filter to link choices together.

Example: choose a region โ†’ only that region's cities appear. Choose a category โ†’ only that category's items appear. It makes long lists way easier to navigate!

๐Ÿ—‚๏ธ Like a folder tree: open "Music," then only see music folders โ€” not your math homework.
๐Ÿ”
Repeat Groups: For When You Have Many of the Same Thing

Collecting info about 5 siblings? 20 trees in a park? 100 survey responses? Repeat groups let you ask the same set of questions over and over โ€” and each round is stored separately.

You'll also learn to aggregate repeats: count how many were collected, sum a number, or find the highest value. That's advanced data wizardry.

๐Ÿงบ Like a basket: you keep dropping in apples, and the basket counts them for you.
๐Ÿท๏ธ
Form Versioning: Change Without Breaking Things

What happens when you edit a form while people are still using it? Chaos! Form versioning in KoboToolbox lets you publish a new version without losing old submissions.

You'll learn to bump version numbers, test in a sandbox, and deploy updates safely โ€” like updating an app without crashing everyone's phone.

๐ŸŽฎ Like game updates: new features arrive, but your saved progress is safe.
๐Ÿ”ฃ
Pattern Patrol: Regular Expressions

Some answers must follow a strict pattern โ€” like phone numbers, email addresses, or codes. Regular expressions (regex) let you describe that pattern, and KoboToolbox rejects anything that doesn't match.

Example: a phone number must be 10 digits. A student ID must start with "STU" and end with 4 numbers. Once you learn regex, you can enforce almost any rule.

๐Ÿ” Like a bouncer at a club: only people meeting the dress code get in.
๐Ÿ“Ž
External Choice Lists: CSV Magic

If your choice list has 500 items (like all the schools in a district), typing them into the form is painful. Instead, upload a CSV file with the choices and reference it from your XLSForm.

The best part? You can update the CSV without rebuilding the whole form. Perfect for big surveys that change often.

๐Ÿ“š Like keeping your vocabulary list in a notebook instead of rewriting it every time.

๐Ÿ› ๏ธ Hands-on activities (no boring stuff!)

1

Rule builder: Create a form with three constraints (age between 5โ€“99, name at least 2 characters, date not in the future). Try submitting bad answers and see the form block them.

2

Smart hiding: Build a form where "What's your pet's name?" only appears if you answer "yes" to having a pet. Use relevant for this!

3

Cascading selects: Make a form with "Continent โ†’ Country โ†’ City." Use choice_filter so each level filters the next.

4

Repeat & count: Create a repeat group for "siblings." Ask each sibling's name and age, then add a calculation that counts how many were entered.

5

Regex challenge: Add a text question for "student ID" and use a regex to require it starts with "STU" and ends with 4 digits. Test valid and invalid inputs.

6

CSV upload: Create a small CSV of 10 choices, upload it to KoboToolbox, and reference it from a select question. Update the CSV and see the change.

๐Ÿ†

By the end of this module, you'll be able to: write advanced XLSForm logic, build cascading selects, use repeat groups, version forms safely, validate with regex, and manage external CSV choice lists.

๐Ÿ† Get Certified

๐Ÿ”’

Earn this certificate

Every lesson is already free to read. Sign up, finish the lessons, pass the exam (โ‚ฆ2,000 or 20,000 coins), and get a verified certificate with your name on it.

๐ŸŽ“ Sign Up to Get Certified
๐Ÿ› ๏ธ Practice Tools
Hands-on simulators & labs - subscription required.
โ†’
๐ŸŽฏ Internship Tasks
Real-world tasks to build your portfolio - unlock them with a subscription.
โ†’