Mandatory Asterisk is not rendered for the Nested field groups

Created on 28 May 2024, 8 months ago
Updated 8 September 2024, 5 months ago

Problem/Motivation

Mandatory Asterisk is not rendered for the Nested field groups

Steps to reproduce

1. Edit Article content type
2. Navigate to manage form display
3. Add nested field groups, move one mandatory field within the nested group
4. Add/Edit the article content
5. Mandatory Asterisk will be missing for Nested field groups (attached the screenshot)

Proposed resolution

.form-required class need to be added for the respective nested field group

🐛 Bug report
Status

Needs review

Version

4.0

Component

Code

Created by

🇮🇳India heykarthikwithu Bengaluru 🌍

Live updates comments and jobs are added and updated live.
  • Novice

    It would make a good project for someone who is new to the Drupal contribution process. It's preferred over Newbie.

Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @heykarthikwithu
  • 🇮🇳India heykarthikwithu Bengaluru 🌍

    I see we would need to add something like this within - formatters/fieldset/fieldset.js

    $('.fieldset__label').first().addClass('form-required');

  • First commit to issue fork.
  • Status changed to Needs review 8 months ago
  • 🇬🇧United Kingdom nexusnovaz

    I've added the line you mentioned above to the file. Tested on a vanilla drupal 10 instance and the first fieldset is marked as required. Though, i suspect another change may be needed to require the second fieldset.

  • Pipeline finished with Failed
    8 months ago
    Total: 243s
    #187679
  • 🇬🇧United Kingdom nexusnovaz

    Apologies!

    Updated the location and the line of code. I believe it now works as expected. Please could !55 this be reviewed

  • Pipeline finished with Failed
    8 months ago
    #187688
  • Status changed to RTBC 8 months ago
  • 🇦🇺Australia jannakha Brisbane!

    this issue affects some themes, eg Claro or Olivero

    MR!55 fixes the issue - tested on D 10.2.7 on Claro and Olivero.

    before

    after

    Why do tests fail?

  • 🇦🇺Australia jannakha Brisbane!

    @Edde20

    what's in the #8 patch?
    does the issue require re-testing?
    please set status of the issue to "needs review" and add some description to what's in the patch.

  • Status changed to Needs review 6 months ago
  • First commit to issue fork.
  • Pipeline finished with Canceled
    6 months ago
    Total: 162s
    #261262
  • Pipeline finished with Failed
    6 months ago
    #261267
  • 🇮🇳India dishakatariya

    Hi, I have verified this issue, on the D11 version. This is working fine for me.

    Testing steps:
    1. Edit Article content type
    2. Navigate to manage form display
    3. Add nested field groups, move one mandatory field within the nested group
    4. Add/Edit the article content
    5. Mandatory Asterisk will be missing for Nested field groups

    Testing Results:
    Applied the patch successfully and aesterisk sign also working fine set as required fields.

    Attaching screeenshots.

    Thanks

  • 🇩🇪Germany Anybody Porta Westfalica
  • 🇨🇴Colombia yasminOrj

    Hi, I’ve reviewed the merge request from comment #13, and it works for me.

    I’ve attached screenshots showing the before and after of checking the branch from the merge request in comment #13.

    Before

    After

    Thanks

Production build 0.71.5 2024