Display default paragraph when field is empty

Created on 9 November 2021, over 3 years ago
Updated 9 June 2025, about 1 month ago

Problem/Motivation

Currently default paragraph type is shown only if the entity is new. This isn't an issue when in single step forms.

However this feature doesn't work, if used along with http://drupal.org/project/forms_steps module. This module creates the entity on the first step, the later steps, use the existing entity. If any of the later steps contain a Paragraph field, the default Paragraph type won't be added.

Steps to reproduce

  1. Install Paragraphs and Forms Steps module.
  2. Create a Content type and a Paragraph type.
  3. Add Paragraph field to the Content type.
  4. Create and enable two Form displays for the Content type.
  5. Place only Body field to the first Form display.
  6. Place only Paragraph field to the second Form display. Make sure to select default Paragraph type.
  7. Create a Forms Steps entity for the Content type and use the Form displays.
  8. Visit the Forms Steps entity and complete first step with Body field.
  9. When second step is opened, paragraph doesn't have default Paragraph type added.

Proposed resolution

If default Paragraph type is selected, then add it both on new and edit forms.

Feature request
Status

Needs work

Version

1.0

Component

Miscellaneous

Created by

🇰🇬Kyrgyzstan elaman

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024