Patch KoboToolbox Form
kobo_patch_formPatch existing KoboToolbox forms by fixing typos, adding choices, toggling required fields, setting skip logic, or removing questions without resending the entire form
Instructions
Make targeted changes to an existing form without resending the whole question list.
This is the safe way to fix a typo, add a choice, or attach skip logic to a form that is already collecting data — everything not named is left exactly as it is.
Args (all optional, combine freely):
uid (string): the form to patch
set_label: [{name, label}] — relabel existing questions
set_hint: [{name, hint}]
set_required: [{name, required}]
set_relevant: [{name, relevant}] — set skip logic; empty string clears it
set_constraint: [{name, constraint, constraint_message}] — empty constraint clears it
add_choices: [{name, choices:[{name,label}]}] — append options to a select question
remove_questions: [names] — delete questions; removing a group removes its contents
redeploy (boolean, default true)
Returns: a per-change report of what was applied and what could not be found.
Examples:
Fix one label: set_label=[{name:"nom_etablissement", label:"Nom de l'établissement"}]
Add skip logic after the fact: set_relevant=[{name:"type_autre", relevant:"${type} = 'autre'"}]
Add a payment option: add_choices=[{name:"moyens_paiement", choices:[{name:"wave",label:"Wave"}]}]
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uid | Yes | Asset uid of the form to patch | |
| redeploy | No | Redeploy so the change goes live | |
| set_hint | No | Change question hints in place | |
| set_label | No | Change question labels in place | |
| add_choices | No | Append options to an existing select question's choice list | |
| set_relevant | No | Set or replace skip logic on existing questions. Pass an empty string to clear it. | |
| set_required | No | Toggle whether questions are mandatory | |
| set_constraint | No | Set or replace a validation rule. Pass an empty constraint to clear it. | |
| remove_questions | No | Names of questions to delete. Removing a group also removes everything inside it. |