Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't validate hidden fields on review page #8840

Merged
merged 8 commits into from
Mar 4, 2025
Merged

Don't validate hidden fields on review page #8840

merged 8 commits into from
Mar 4, 2025

Conversation

cibelius
Copy link
Contributor

@cibelius cibelius commented Mar 4, 2025

Review page form validation

  • Add logic for stripping away hidden fields before seeing if there are validation errors
  • Change function stripHiddenOrDisabledFields() to only strip hidden fields -> stripHiddenFields()

Misc.

  • Refactor event helper functions a bit
  • Fix submit check mark

I will also see if more e2e tests can be ported into farajaland repo due to this.
EDIT: still need to fix this before forms can be correctly submitted on tests: #8821

Copy link

github-actions bot commented Mar 4, 2025

Oops! Looks like you forgot to update the changelog. When updating CHANGELOG.md, please consider the following:

  • Changelog is read by country implementors who might not always be familiar with all technical details of OpenCRVS. Keep language high-level, user friendly and avoid technical references to internals.
  • Answer "What's new?", "Why was the change made?" and "Why should I care?" for each change.
  • If it's a breaking change, include a migration guide answering "What do I need to do to upgrade?".

@cibelius cibelius changed the title WIP: dont validate hidden fields on review page Don't validate hidden fields on review page Mar 4, 2025
@cibelius cibelius marked this pull request as ready for review March 4, 2025 10:09
@cibelius cibelius added the 🚀 Ready to deploy Deployment automation should pick this PR up and start auto-deploying it label Mar 4, 2025
@ocrvs-bot
Copy link
Collaborator

Your environment is deployed to https://ocrvs-8799.opencrvs.dev

@cibelius cibelius deployed to ocrvs-8799 March 4, 2025 10:32 — with GitHub Actions Active
Copy link
Collaborator

@makelicious makelicious left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Could you add a test case to show case the fix? Maybe on utility level?

@cibelius cibelius removed the 🚀 Ready to deploy Deployment automation should pick this PR up and start auto-deploying it label Mar 4, 2025
@cibelius cibelius enabled auto-merge (squash) March 4, 2025 13:09
@cibelius cibelius merged commit c84768d into develop Mar 4, 2025
43 checks passed
@cibelius cibelius deleted the ocrvs-8799 branch March 4, 2025 13:09
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.

Form values on hidden fields can cause the submission button to be disabled on review page
3 participants