Select to view content in your preferred language

Allow XLSForm to enforce photo orientation (landscape/portrait) in Survey123

494
2
09-05-2025 04:13 AM
Status: Open
Labels (3)
BenBlowers2
Occasional Contributor

Survey123’s embedded camera control does not provide a way to enforce photo orientation. In field workflows, this leads to a mix of landscape and portrait images for the same question or across a survey. When generating automated Survey123 Feature Reports (e.g., images in tables or fixed-width placeholders), mixed orientations cause layout breaks, inconsistent scaling, and extra post-processing.

Proposed Enhancement

Add an optional orientation parameter for image questions in XLSForm to enforce or strongly guide capture orientation.

Option A: Hard enforcement (validation)

  • Blocks shutter when device orientation doesn’t match the parameter.

  • Shows an in-app prompt to rotate the device.

Option B: Soft enforcement (guided)

  • Allows capture but flags the photo (warning) and/or auto-rotates if possible.

Suggested syntax (in the parameters or bind::esri:parameters column): orientation=landscape orientation=portrait orientation=any # default (current behavior)

Optional modifiers:

orientation=landscape;enforce=true # block capture until correct orientation=portrait;warn=true # allow but show warning banner orientation=landscape;autorotate=true # auto-rotate if EXIF permits

Behavior Details

  • UI prompt: If enforce=true, the capture UI displays “Rotate device to landscape/portrait to continue.”

  • Validation: Orientation must match at the moment of shutter.

  • EXIF handling: If autorotate=true, Survey123 writes/normalizes the image so downstream apps see the expected orientation without relying on EXIF-only rotation flags.

  • Accessibility: If device rotation is locked, show a clear message and allow override when warn=true (configurable).

  • Backwards compatibility: Default remains orientation=any so existing surveys are unaffected.

Benefits

  • Consistent outputs for automated reports (no broken tables or stretched images).

  • Reduced post-processing (no manual rotate/crop after submission).

  • Cleaner storage & bandwidth (fewer duplicates from re-takes).

  • Better UX for field staff with clear, in-the-moment guidance.

Example Use Case

An environmental inspection survey places two photos per row in a 4:3 table cell. Requiring landscape ensures every image fits the cell without overflow, eliminating manual fixes and re-captures.

2 Comments
RHammers

This would be a very useful feature.

BrandonA_CDPH

This would be great for automated Feature Reports and consistency for later analysis.