Skip to content

datasets - update station ID input for custom subset requests - #751

Open
tcram wants to merge 10 commits into
mainfrom
subset-form-update
Open

datasets - update station ID input for custom subset requests#751
tcram wants to merge 10 commits into
mainfrom
subset-form-update

Conversation

@tcram

@tcram tcram commented Jul 17, 2026

Copy link
Copy Markdown
Member

This pull request updates the way station IDs are handled in the dataset forms and related frontend code, improving consistency and allowing for both 5- and 6-digit WMO numbers. The main changes include renaming the field, updating validation, and ensuring all references use the new field name.

Form and Validation Updates:

  • Renamed the form field from station0 to stationIDs in datasets/forms.py, and updated validation to accept both 5- and 6-digit WMO numbers. The label and widget attributes were also updated for clarity and consistency.

Frontend and Template Consistency:

  • Updated all references in the frontend JavaScript (datasets/static/datasets/js/BUFR_subset.js) to use the new stationIDs field instead of station0.
  • Modified the templates custom-subset-page-d351000.html and custom-subset-page-d461000.html to use the new stationIDs form field, replacing the previous manual label and textarea with the Django form field rendering. [1] [2]This pull request updates the station ID input field in the custom subset forms to use the Django form rendering system and improves form validation and labeling. The most important changes are:

Form rendering and validation improvements:

  • The station ID input in both custom-subset-page-d351000.html and custom-subset-page-d461000.html is now rendered using {{ form.station0 }} instead of a manually coded <textarea>, ensuring consistent rendering and validation. [1] [2]
  • The station0 field in datasets/forms.py now enforces a minimum length of 5 characters, updates the label to "Station IDs (comma-separated)", and explicitly sets the field's id attribute for better accessibility and consistency.

@tcram tcram self-assigned this Jul 17, 2026
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