User tests: Successful: Unsuccessful:
Pull Request for Issue #25785.
Currently, it is not possible to provide default value for Checkboxes and Multiple List custom fields. You would get the following error if you try to do that
Save failed with the following error: The default value is invalid
This PR just fixes that wrong validation.
When you try to set the field, you will get validation error:
Save failed with the following error: The default value is invalid
No error. Field saved properly.
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed
Category | ⇒ | Administration com_fields |
Status | New | ⇒ | Pending |
The List field example should be ["value1", "value2"]
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
Labels |
Added:
?
|
RTC
Labels |
Added:
?
|
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2022-12-29 15:00:59 |
Closed_By | ⇒ | roland-d |
Thank you
I have tested this item✅ successfully on 53b3c38
Tested successfully in Joomla 4.2.6-rc2-dev of 5 December using Wampserver and PHP 8.1.10.
BTW, the example of default values for the List custom field starts with an extra double quote: [""value1", "value2"]
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/39354.