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

Bug: getFormData does not work for forms in accordions #73

Open
mbarde opened this issue Sep 12, 2023 · 0 comments
Open

Bug: getFormData does not work for forms in accordions #73

mbarde opened this issue Sep 12, 2023 · 0 comments

Comments

@mbarde
Copy link
Contributor

mbarde commented Sep 12, 2023

What?

Requests for actions getFormData and clearFormData are not fired in edit mode as intended when a form exists within an accordion.

Steps to reproduce

  1. Setup Plone 6 with volto-form-block and volto-accordion-block
  2. Add accordion block to a page
  3. Add form block into accordion item
  4. Configure form to store data
  5. Submit data
  6. Check storage in edit
  7. See that no data is shown (despite form submission did work)

Versions

  • Volto 16.23.0
  • Plone 6.0.6
  • volto-form-block 3.1.0
  • @eeacms/volto-accordion-block 10.3.0
  • collective.volto.formsupport 2.7.0

Reason

Sidebar.jsx (which toggles the requests) refers to a prop called properties, which does not contain the expected data when forms exists within an accordion block. In that case the relevant info is in metadata instead of properties.

Proposed fix

If metadata is present in props of Edit component, pass it as properties to Sidebar component (see #74).

mbarde added a commit to mbarde/volto-form-block that referenced this issue Aug 5, 2024
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