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

Retain checked state when using nunjucks macros #564

Closed
kr8n3r opened this issue Jul 25, 2018 · 1 comment
Closed

Retain checked state when using nunjucks macros #564

kr8n3r opened this issue Jul 25, 2018 · 1 comment

Comments

@kr8n3r
Copy link

kr8n3r commented Jul 25, 2018

by @gazjoy, moved from govuk-design-system-backlog

Hi folks, I am using GOV.UK Prototype Kit v7.0.0-beta.10 and have an issue with the kit when using the checkbox macro and data on a checked item, see demo code.

Expecting:

  1. I check a check box and continue
  2. I view check answers and click change
  3. My previous answer is retained

Actual:

  1. I check a check box and continue
  2. I view check answers and click change
  3. My previous answer is not retained

When I want to change one of the answers on this screen I revisit the page and the checked item is no longer checked. I can also trigger the issue by clicking back in the journey and refreshing the page. When I use the HTML instead to the nunjucks macro adding {{ checked("contact-preference", "contact-preference-text") }} I see the expected result.

@kr8n3r
Copy link
Author

kr8n3r commented Jul 25, 2018

solved by using checked function. need to add guidance how to use data in nunjucks macros
will be addressed by #563

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

No branches or pull requests

1 participant