Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The default widget is always hidden, I'd like to see the value when editing.
Comment | File | Size | Author |
---|---|---|---|
#11 | serial-disabled_widget-2929297-10.patch | 11.32 KB | JohanKleene |
Comments
Comment #2
StefanPr CreditAttribution: StefanPr at ezCompany commentedI've added a widget that shows a disabled text_field with the value.
When creating a new entity the probable value is shown in the field.
The value shown might be wrong because another entity might have been created in the meanwhile, added to the #description.
The 'next value' is retrieved querying the information_schema.
Database connection is injected
I've adjusted some comments to be more reasoning.
I'm not an expert on the testing part, but I've tried to do atleast as much testing as there was for the default widget. I've also replaced the deprecated functions from the test class.
Comment #3
StefanPr CreditAttribution: StefanPr at ezCompany commentedComment #4
StefanPr CreditAttribution: StefanPr at iO commentedComment #5
ralphvdhoudt CreditAttribution: ralphvdhoudt at iO commentedRecreated patch against latest dev
Comment #6
ralphvdhoudt CreditAttribution: ralphvdhoudt at iO commentedBetter patch name
Comment #7
ralphvdhoudt CreditAttribution: ralphvdhoudt at iO commentedRerolled the patch against 2.0.0
Comment #8
ralphvdhoudt CreditAttribution: ralphvdhoudt at iO commentedFix for D10
Comment #9
ralphvdhoudt CreditAttribution: ralphvdhoudt at iO commentedD10 Fix (correct patch)
Comment #10
ralphvdhoudt CreditAttribution: ralphvdhoudt at iO commentedD10 Fix (correct patch part 2)
Comment #11
JohanKleene CreditAttribution: JohanKleene as a volunteer and at iO commentedUpdated patch for the 2.0.x version.