User tests: Successful: Unsuccessful:
Pull Request for Issue #46655 .
This PR adds support for an exclude attribute to the category form field type, allowing developers to exclude specific category IDs from the dropdown list.
Developers often need to exclude certain categories (like "Uncategorized") from category selection lists in forms. Previously, there was no built-in way to do this with the standard category field type.
Added an exclude attribute that accepts a comma-separated list of category IDs to exclude from the options.
<field
name="category"
type="category"
extension="com_content"
exclude="1,5,10"
label="Select Category"
/>getOptions() method of CategoryField classintval()The implementation follows the same pattern as the custom field provided in issue #46655 and has been tested to ensure:
Closes #46655
| Status | New | ⇒ | Pending |
| Category | ⇒ | Libraries |
ok sir
Please close this
Whtl
Whtl
| Status | Pending | ⇒ | Closed |
| Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2026-01-12 07:55:54 |
| Closed_By | ⇒ | pashaarshad | |
| Labels |
Added:
Feature
PR-5.4-dev
|
||
| Status | Closed | ⇒ | New |
| Closed_Date | 2026-01-12 07:55:54 | ⇒ | |
| Closed_By | pashaarshad | ⇒ |
| Status | New | ⇒ | Pending |
| Status | Pending | ⇒ | Closed |
| Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2026-01-12 07:56:09 |
| Closed_By | ⇒ | pashaarshad |
Ok sir
@pashaarshad Please rebase this PR to 6.1-dev. 5.4 and 6.0 do not accept new feautures. See https://github.com/joomla/joomla-cms?tab=readme-ov-file#which-branch-should-my-pull-request-target .