{
  "slug": "field-inspection",
  "name": "Field inspection",
  "description": "Record the state of a machine, a vehicle, or a structure on site, with photos and a signature.",
  "page": "https://lazerforms.com/use-cases/field-inspection",
  "create_url": "https://lazerforms.com/signup?template=field-inspection",
  "fields": [
    {
      "id": "insp_asset",
      "type": "select",
      "label": "Asset",
      "required": true,
      "description": "",
      "options": [
        {
          "label": "EX-11 Excavator 5T",
          "value": "ex_11_excavator_5t"
        },
        {
          "label": "LD-04 Loader 12T",
          "value": "ld_04_loader_12t"
        },
        {
          "label": "TR-27 Rigid truck",
          "value": "tr_27_rigid_truck"
        },
        {
          "label": "GN-02 Generator 60kVA",
          "value": "gn_02_generator_60kva"
        }
      ]
    },
    {
      "id": "insp_operator",
      "type": "text",
      "label": "Operator name",
      "required": true,
      "description": ""
    },
    {
      "id": "insp_date",
      "type": "datepicker",
      "label": "Inspection date",
      "required": true,
      "description": ""
    },
    {
      "id": "insp_shift",
      "type": "select",
      "label": "Shift",
      "required": true,
      "description": "",
      "options": [
        {
          "label": "Day",
          "value": "day"
        },
        {
          "label": "Afternoon",
          "value": "afternoon"
        },
        {
          "label": "Night",
          "value": "night"
        }
      ]
    },
    {
      "id": "insp_fluids",
      "type": "checkbox-simple",
      "label": "Fluid levels are within range",
      "required": true,
      "description": ""
    },
    {
      "id": "insp_tracks",
      "type": "checkbox-simple",
      "label": "Tracks, tyres, and undercarriage are sound",
      "required": true,
      "description": ""
    },
    {
      "id": "insp_guards",
      "type": "checkbox-simple",
      "label": "Guards and isolators are in place",
      "required": true,
      "description": ""
    },
    {
      "id": "insp_defects",
      "type": "textarea",
      "label": "Defects found",
      "required": false,
      "description": ""
    },
    {
      "id": "insp_photos",
      "type": "fileupload",
      "label": "Photos of any defect",
      "required": false,
      "description": "Up to six photos. Take one wide shot and one close shot of each fault.",
      "max_files": 6
    },
    {
      "id": "insp_sign",
      "type": "signature-pad",
      "label": "Operator signature",
      "required": true,
      "description": ""
    }
  ],
  "structure": [
    {
      "id": "insp_h1",
      "type": "heading",
      "label": "",
      "config": {
        "required": false,
        "placeholder": "",
        "description": ""
      },
      "meta": {
        "text": "Machine and shift",
        "level": 2,
        "alignment": "left",
        "color": "#000",
        "font_size": 0,
        "font_weight": "700",
        "margin_top": 24,
        "margin_bottom": 8
      }
    },
    {
      "id": "insp_asset",
      "type": "select",
      "label": "Asset",
      "config": {
        "required": true,
        "placeholder": "",
        "description": ""
      },
      "meta": {
        "options": [
          {
            "label": "EX-11 Excavator 5T",
            "value": "ex_11_excavator_5t"
          },
          {
            "label": "LD-04 Loader 12T",
            "value": "ld_04_loader_12t"
          },
          {
            "label": "TR-27 Rigid truck",
            "value": "tr_27_rigid_truck"
          },
          {
            "label": "GN-02 Generator 60kVA",
            "value": "gn_02_generator_60kva"
          }
        ]
      }
    },
    {
      "id": "insp_operator",
      "type": "text",
      "label": "Operator name",
      "config": {
        "required": true,
        "placeholder": "Full name",
        "description": ""
      },
      "meta": {
        "minlength": 0,
        "maxlength": 0
      }
    },
    {
      "id": "insp_date",
      "type": "datepicker",
      "label": "Inspection date",
      "config": {
        "required": true,
        "placeholder": "",
        "description": ""
      },
      "meta": {
        "min": "",
        "max": ""
      }
    },
    {
      "id": "insp_shift",
      "type": "select",
      "label": "Shift",
      "config": {
        "required": true,
        "placeholder": "",
        "description": ""
      },
      "meta": {
        "options": [
          {
            "label": "Day",
            "value": "day"
          },
          {
            "label": "Afternoon",
            "value": "afternoon"
          },
          {
            "label": "Night",
            "value": "night"
          }
        ]
      }
    },
    {
      "id": "insp_h2",
      "type": "heading",
      "label": "",
      "config": {
        "required": false,
        "placeholder": "",
        "description": ""
      },
      "meta": {
        "text": "Walk around",
        "level": 2,
        "alignment": "left",
        "color": "#000",
        "font_size": 0,
        "font_weight": "700",
        "margin_top": 24,
        "margin_bottom": 8
      }
    },
    {
      "id": "insp_fluids",
      "type": "checkbox-simple",
      "label": "Fluid levels are within range",
      "config": {
        "required": true,
        "placeholder": "",
        "description": ""
      },
      "meta": {
        "defaultValue": ""
      }
    },
    {
      "id": "insp_tracks",
      "type": "checkbox-simple",
      "label": "Tracks, tyres, and undercarriage are sound",
      "config": {
        "required": true,
        "placeholder": "",
        "description": ""
      },
      "meta": {
        "defaultValue": ""
      }
    },
    {
      "id": "insp_guards",
      "type": "checkbox-simple",
      "label": "Guards and isolators are in place",
      "config": {
        "required": true,
        "placeholder": "",
        "description": ""
      },
      "meta": {
        "defaultValue": ""
      }
    },
    {
      "id": "insp_defects",
      "type": "textarea",
      "label": "Defects found",
      "config": {
        "required": false,
        "placeholder": "Describe anything that needs a workshop.",
        "description": ""
      },
      "meta": {
        "minlength": 0,
        "maxlength": 0,
        "rows": 4
      }
    },
    {
      "id": "insp_photos",
      "type": "fileupload",
      "label": "Photos of any defect",
      "config": {
        "required": false,
        "placeholder": "",
        "description": "Up to six photos. Take one wide shot and one close shot of each fault."
      },
      "meta": {
        "allowed_types": "jpg, png",
        "camera": true,
        "max_files": 6,
        "min_files": 0
      }
    },
    {
      "id": "insp_div",
      "type": "divider",
      "label": "",
      "config": {
        "required": false,
        "placeholder": "",
        "description": ""
      },
      "meta": {
        "style": "solid",
        "color": "#ddd",
        "thickness": 1,
        "margin_top": 20,
        "margin_bottom": 20
      }
    },
    {
      "id": "insp_sign",
      "type": "signature-pad",
      "label": "Operator signature",
      "config": {
        "required": true,
        "placeholder": "",
        "description": ""
      },
      "meta": {
        "height": 180,
        "pen_color": "#000",
        "background_color": "#ffffff"
      }
    }
  ],
  "example_submission": {
    "values": {
      "insp_asset": "ex_11_excavator_5t",
      "insp_operator": "Full name",
      "insp_date": "2026-09-09",
      "insp_shift": "day",
      "insp_fluids": "yes"
    },
    "idempotency_key": "field-inspection-2026-09-09-001",
    "agent": {
      "name": "your-agent"
    }
  },
  "notes": [
    "Key every value by the field id, never by the label. A label may be renamed.",
    "A fileupload value is {\"base64\", \"filename\", \"content_type\"} or {\"url\"}, capped at 3 MB.",
    "A select value must match one of the option values exactly.",
    "A checkbox-simple value is one of yes, no, or na.",
    "A datepicker value is YYYY-MM-DD.",
    "Send an idempotency_key so a retry cannot store the same submission twice."
  ]
}