New feature: Allow module developers and site builders to define the text displayed instead of '- None -' or '- Select a value -'
I have attached a patch. To make the code a bit shorter by using the ?? operator, I also set the minimum PHP requirement to PHP 7.0.
Feedback to the patch content and the feature are welcome. I suggest commiting it in three separate commits:
- Add composer.json
- Source code formatting: use statements alphabetically
- New feature
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | ui.jpg | 28.81 KB | el1_1el |
| #7 | 3023842-use-field-settings-not-plugin-settings.patch | 1.68 KB | hoanns |
| Added-PHP-7-as-min-requirement---new-option-empty_value.patch | 4.45 KB | gogowitsch |
Comments
Comment #2
el1_1el commentedComment #3
gogowitsch commentedThe code from the patch has been in production for 4 months now, without any issues.
Comment #5
el1_1el commentedI added this with a setting in the UI so its easier to change. Thanks!
Comment #7
hoanns commentedWhere is that GUI or how would I set it programmatically for a field?
Couldn't find anything, I'm just gonna use gogowitschs basefield solution with the following patch
Comment #8
el1_1el commentedyeah the dev branch of this module was screwed up due to a bad tag. ive removed that tag and it seems composer gets the dev package at head now, although it's coming in at 1.4 from the dev release page which i've removed. The empty text should be available in the widget settings.
