Manual
Manual copied to clipboard
Updated Standard Fields index
User description
Added a section that lists optional options for all field types
PR Type
Documentation
Description
- Added comprehensive documentation section for common options available to all form field types
- Listed and described 13 standard options that are inherited from the base
FormFieldclass - Each option includes its default value and functional description
- Documented important form field behaviors like autocomplete, spellcheck, hidden states, and accessibility features
- Added deprecation notice for 'validate' option with reference to proper validation documentation
Changes walkthrough 📝
| Relevant files | |||
|---|---|---|---|
| Documentation |
|
💡 PR-Agent usage: Comment
/help "your question"on any pull request to receive relevant information
Qodo Merge was enabled for this repository. To continue using it, please link your Git account with your Qodo account here.
PR Reviewer Guide 🔍
Here are some key observations to aid the review process:
| ⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪ |
| 🧪 No relevant tests |
| 🔒 No security concerns identified |
⚡ Recommended focus areas for reviewDocumentation Accuracy
|
Qodo Merge was enabled for this repository. To continue using it, please link your Git account with your Qodo account here.
PR Code Suggestions ✨
Explore these optional code suggestions:
| Category | Suggestion | Score |
| General |
✅ Documentation should be free of grammatical errors and typosSuggestion Impact:The commit fixed the grammatical error in the autocomplete description by adding 'autocompleted' instead of just 'automatically'code diff:
Fix typo in 'autocomplete' description where "automatically" is incomplete. docs/general-concepts/forms-fields/standard-fields/index.md [16]
Suggestion importance[1-10]: 8Why: The current description is grammatically incorrect and confusing. Fixing this improves documentation clarity and professionalism, making it easier for developers to understand the autocomplete functionality. | 8 |
Documentation should specify the expected type and format for configuration optionsAdd missing type information for the 'pattern' option to clarify that it expects a docs/general-concepts/forms-fields/standard-fields/index.md [28]
Suggestion importance[1-10]: 7Why: Adding type information makes the documentation more precise and helps developers understand the expected input format for the pattern option. This reduces potential errors and improves code quality. | 7 | |
Documentation examples should demonstrate realistic and common use casesAdd example values for the 'class' option to demonstrate proper usage. docs/general-concepts/forms-fields/standard-fields/index.md [29]
Suggestion importance[1-10]: 5Why: While the existing example is valid, providing more realistic class names helps developers better understand common use cases. However, the current example is already functional, making this a minor improvement. | 5 |
Looks nice, but I miss the data and aria attributes? or are they already documented somewhere?
Looks nice, but I miss the data and aria attributes? or are they already documented somewhere?
Good Point - I've missed that - data attributes are ok - but when testing aria as form field attribute (backend module params for example) it does not get rendered there...
Hmm, ai have to look at the but thought it should be exposed...
It's important to be clear about the difference between 2 different things:
-
attributes which can be applied to the standard form fields
-
options which can be passed to the
renderField()function.
Most of what you have are attributes, and for these I think that it would be better to include those in the Standard Form Field Attributes page at https://manual.joomla.org/docs/general-concepts/forms-fields/standard-form-field-attributes/ . You can always link to that from the index page, if you think that's appropriate.
There's a bit of overlap in that the "pattern" and "class" are in both your list and on that Standard Form Field Attributes page.
Also the "validate" attribute is still used by Joomla - for server-side validation. It's on that page as well.
However, some of your items are just elements in the $options array of the renderField function. I think that hiddenLabel and hiddenDescription are examples of these. I may be wrong, but looking at the code I don't think that they are general attributes of the form fields.
I've often thought it poor that these $options weren't properly documented in the API documentation. There are lots of APIs which have a $config or $options parameter with no description of what that parameter can be set to. I think the API documentation is where they should be documented. And then we can refer to that API documentation from the manual.
thanks @robbiejackson I missed https://manual.joomla.org/docs/next/general-concepts/forms-fields/standard-form-field-attributes/
I have the feeling that "Form" and "Fields" needs a better structure, not sure in which direction but at least mennu ordering might be needed.
I would also suggest to structure the standard attributes and similar in away that we automatically include them in each fields for better DX.
I created a test PR at #357
@robbiejackson oooh I've missed that too... but as @HLeithner mentioned if we don't see it we need to change something in the structure.
@marcorensch would you try to update your pr with includes?