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

FIO-8948-8950: fixed an issue where radio and select boxes with url type do not display in PDF download #5821

Conversation

TanyaGashtold
Copy link
Contributor

@TanyaGashtold TanyaGashtold commented Sep 19, 2024

Link to Jira Ticket

https://formio.atlassian.net/browse/FIO-8948
https://formio.atlassian.net/browse/FIO-8950

Description

What changed?

Issues that this PR fixed:

  • when it takes long time to load options for radio/selectboxes with url type, nothing indicates that the options are being loaded, the component displays just component label and not options. This PR adds the loader so that user could understand that it needs to wait.
  • it was possible to submit the form even when radio/selectboxes options are not loaded. Because of it, the metadata related to the options was not included in the submission object. That caused issues with options display in readOnly and pdf download. This PR adds the beforeSubmit handler that allows to submit the form only after the options are loaded.
  • if the radio/selectboxes with url type had an empty value, the renderer did not take options from metadata but attempts to load it from url in readOnly. This caused options not to display in PDF download. This PR adds a check that forces to take options from metadata in this case.

How has this PR been tested?

Manually + tests

Checklist:

  • I have completed the above PR template
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (if applicable)
  • My changes generate no new warnings
  • My changes include tests that prove my fix is effective (or that my feature works as intended)
  • New and existing unit/integration tests pass locally with my changes
  • Any dependent changes have corresponding PRs that are listed above

@johnformio johnformio merged commit 0caf41b into master Sep 19, 2024
5 checks passed
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.

2 participants