Skip to content

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

Open
@mbarde

Description

@mbarde

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions