Skip to content

feat(medic/cht-core#10676): store geolocation when submitting contact forms#2221

Draft
cliftonmcintosh wants to merge 2 commits into
medic:mainfrom
cliftonmcintosh:feature/10676-contact-form-geolocation-stored
Draft

feat(medic/cht-core#10676): store geolocation when submitting contact forms#2221
cliftonmcintosh wants to merge 2 commits into
medic:mainfrom
cliftonmcintosh:feature/10676-contact-form-geolocation-stored

Conversation

@cliftonmcintosh

Copy link
Copy Markdown
Contributor

Description

Documents the new geolocation widget for contact forms, introduced in medic/cht-core#10676.

New pagebuilding/forms/configuring/contact-geolocation.md

Full reference for configuring GPS location capture in contact forms. Covers:

  • XForm XML changes: model instance fields, binds, body group, and translations
  • XLSForm equivalent (survey and choices sheet rows)
  • Widget behavior states: before capture, in progress, on success, on failure (with retry)
  • What gets stored on the contact document (geo_capture, geo_context, geolocation, geolocation_log)
  • Customizing context choices beyond the home/workplace/other defaults
  • Omitting the optional context question

Updatedbuilding/forms/contact.md

New "Capturing GPS Location" section with a link to the configuring page, following the same pattern as the existing "Uploading Binary Attachments" section.

Updatedbuilding/contact-management/contacts.md

New "GPS location capture" subsection under "Creating and Editing Contacts" alongside the existing Duplicate Contact Detection entry.

AI Disclosure

Claude Code (claude-sonnet-4-6) was used to draft all documentation in this PR. The content was based on a technical draft prepared by a separate Claude Code session that worked directly in the cht-core codebase. I reviewed the output for accuracy, style guide compliance, and correct placement within the docs site structure.

License

The software is provided under AGPL-3.0. Contributions to this project are accepted under the same license.

…orms

Add reference page for the new geolocation widget that captures GPS
coordinates when a contact is created or edited. Documents XForm XML
and XLSForm configuration, widget behavior states, stored fields
(geolocation, geolocation_log), and context question customization.
Cross-reference from the contact forms reference page and the
contacts feature overview.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…implementation

Correct factual errors introduced before implementation was finalized:
remove geo_context XForm field, fix geolocation_log shape (is_home
boolean), fix skip value ("skipped"), scope geolocation field to home
captures only. Add edit mode and weak-signal failure path. Replace UI
string quotes and button labels with functional descriptions.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant