Skip to content

Custom Fields

Custom Fields allow you to tailor your sanitation forms to collect exactly the type of data you need. From simple numbers to complex formulas, you can build powerful data collection tools.

Each sanitation form has three levels where you can add custom fields: Route, Tree, and Sample. To add a field, click the “Add question” button at the corresponding level.

Custom fields section in form

The interface allows you to view all existing fields organized by level, each showing its type, color identifier, visibility conditions, and options to edit, duplicate, or delete.

When adding a field to a form level, you can choose from the following types:

TypeWhen to use
TextShort text like comments or names.
Text AreaLonger descriptions or observations.
NumberFor values you want to calculate or average (e.g., “Pest count”).
CheckboxFor simple “Yes/No” or “Present/Absent” indicators.
Select FieldChoose one option from a dropdown list.
Radio ButtonsChoose one option from a visible list.
Date / DatetimeFor logging specific moments or deadlines.
File / PhotoTo attach photographic evidence or documents.
AssociationLink the entry to another record in your finca (e.g., a specific Contractor or Supply).
CalculatedFor automatic math based on other fields.

You can ensure data quality by setting rules for your fields:

  • Required: The monitor cannot finish the entry without filling this field.
  • Min/Max Values: For numbers, you can set limits (e.g., “Temperature must be between 0 and 50”).
  • Patterns: For text, you can enforce formats like “Numbers only” or “Alphanumeric”.

Validation settings for numeric field

The image shows validation options for a numeric field: minimum value, maximum value, and increment (step).

You can hide or show fields based on other answers.

  • Example: Only show a “Photo” field if the “Disease present” checkbox is checked.
  • Note: Conditional logic in Sanitation Forms currently works based on Checkbox fields.

Conditional field configuration

The “Visible Si” (Show If) section allows you to specify which checkbox field must be marked (Yes/No) for this field to appear in the form.

Calculated fields perform math automatically as the monitor enters data.

  • Formulas: You can use standard math operations (+, -, *, /) and parentheses.
  • References: Use the “Insert Field” button to reference other numeric fields in your formula.
  • Hierarchy: A field at the Sample level can reference fields from the Tree and Route levels.

Formula editor for calculated fields

The formula editor displays available fields you can insert (organized by level), mathematical operators, and the text area where you build your formula.

Important for Reports

Field types like Number, Checkbox, and Select are the best for generating clear charts and maps. Free-text fields are harder to analyze at scale.