- Issue created by @gauravvvv
- ๐ฎ๐ณIndia indrapatil Bangalore
Hello @Gauravvvv
there are two options to consider for addressing the issue related to the "Name" and "Machine-readable" fields which are hidden in the Add form mode:
1.Make the "Name" Field Mandatory:
If the "Name" field is intended to be mandatory for creating a new form mode, you should add the necessary validation to enforce this requirement. Additionally, it would be essential to provide a visual indication (mandatory sign or asterisk) in the user interface to inform users that the "Name" field is required. By doing so, users will know they need to provide a value for the "Name" field before they can successfully create a new form mode.2. Remove Validation for the Machine-Readable Field:
If the "Machine-readable" field is causing confusion or if it's not necessary to be mandatory for the form mode creation, you could consider removing the validation for this field. This would allow users to create new form modes without having to provide a value for the "Machine-readable" field. However, it's essential to assess the implications of removing this validation and ensure that it won't lead to unintended consequences or issues in the system.The decision between these two options depends on the requirements and design of the project. If the "Machine-readable" field is not a critical aspect of the form mode creation, removing its validation might be a reasonable solution. On the other hand, if the "Name" field is a crucial piece of information and should be mandatory for the creation process, then adding the necessary validation and visual indication would be appropriate.
- Status changed to Needs review
over 1 year ago 5:33am 21 July 2023 - last update
over 1 year ago 29,826 pass, 2 fail - ๐ฎ๐ณIndia vaibhav_arora
Hi, I have added patch #3 and added sign (asterisk) also attaching screenshot for the same.
The last submitted patch, 3: 3375406-3.patch, failed testing. View results โ
- last update
over 1 year ago 29,827 pass - Status changed to Needs work
over 1 year ago 4:39am 24 July 2023 - Status changed to Needs review
over 1 year ago 5:15am 24 July 2023 - ๐ฎ๐ณIndia Harish1688 India
Hi,
Tested the patch 3375406-3.patch for the issue The "Name" field in the Add form mode is required, although it lacks any mandatory sign. after applying the patch issue was resolved, mark (asterisk) are showing on the required field (Name). attached the images for reference.
Testing Steps:
1. Install the Drupal 11.x set up and moved on the path '/admin/structure/display-modes/form
'
2. click add form mode button and choose form mode entity type 'content'.
3. In the dialog box issue will be appear.Before:
After:
Looks good for RTBC+
- Status changed to Needs work
over 1 year ago 1:34pm 24 July 2023 - ๐บ๐ธUnited States smustgrave
Patch no longer applies cleanly to 11.x.
Also wonder if a simple assertion could be added to check for the form-required class.
- Status changed to Needs review
over 1 year ago 10:49am 1 August 2023 - last update
over 1 year ago 29,912 pass - Status changed to Needs work
over 1 year ago 6:19pm 1 August 2023 - ๐บ๐ธUnited States smustgrave
If we can add that simple assertion to make sure this field has the required class.
- ๐ฎ๐ณIndia indrapatil Bangalore
@smustgrave we need to add an assertion for the Name field or Machine-readable field.
Marking the fields as required is already been taken care in the Allow user to add display modes from respective field UI's. ๐ Allow user to add display modes from respective field UI's. Needs work issue. I think we can ask for the test coverage on the same issue.
- ๐ฎ๐ณIndia Akhil Babu Chengannur
Akhil Babu โ made their first commit to this issueโs fork.
- ๐ฎ๐ณIndia djsagar
@Akhil Babu MR !6237 and patch #8 both are same can you please elaborate why created MR.
After applied patch #8 label is required.Moving this to NW.
- ๐ฎ๐ณIndia Akhil Babu Chengannur
@djsagar, Using a merge request is now the recommended approach in Drupal over a patch. Iโm sorry for forgetting to add a comment initially ๐ฌ. Iโve included a test as mentioned in #9.
Moving to Needs review - Status changed to Needs review
11 months ago 9:35am 19 January 2024 Tested Merge request !6237 on Drupal 11.x and it looks good. Now the name field has a required asterisk icon.
Before MR -
After MR -
- Status changed to RTBC
11 months ago 12:28pm 22 January 2024 - ๐ฌ๐งUnited Kingdom longwave UK
Not entirely convinced the test adds any value here, but let's add it anyway now that it was written.
Backported as a bug fix to 10.2.x.
Committed and pushed f50c6a352d to 11.x and 46549a06b6 to 10.2.x. Thanks!
-
longwave โ
committed 46549a06 on 10.2.x
Issue #3375406 by Akhil Babu, vaibhav_arora, shweta__sharma, Harish1688...
-
longwave โ
committed 46549a06 on 10.2.x
- Status changed to Fixed
11 months ago 6:31pm 3 February 2024 -
longwave โ
committed f50c6a35 on 11.x
Issue #3375406 by Akhil Babu, vaibhav_arora, shweta__sharma, Harish1688...
-
longwave โ
committed f50c6a35 on 11.x
Automatically closed - issue fixed for 2 weeks with no activity.