This plugin enables overriding of the XML files which define the fields to be used on a JForm. (Note: All core components and many third-party components use JForm, but not all third-party extensions do.)
The XML files to be overridden reside in the component's directory /models/forms/. This is true for both sides of the component: admin ad site.
enabling the plugin
Enabling/disabling turns this overriding on and off.
Specify whether this installation is on a Linux versus a Windows machine. The "unsure" option will handle both scenarios. (If you are developing on WAMP and installing on LAMP, you might want to use "unsure" to both operating systems.
Overriding an XML file
- Copy the XML file to be overridden and put it in a directory corresponding to this pattern:
and for the admin side:
- Modify this new file to include the changes you desire
- With this plugin enabled, enter the name of the component (e.g., com_content) where the plugin should look for an overriding file. To list multiple components, separate the component names with a comma. You need to specify separately for admin versus site components.
Application of overriding form fields
Any field attribute within the XML can be changed. This provides a plethora of opportunies:
- add/change default values
- disable a field
- make a field required
- make a field hidden
- add a filter rule
- change field types such as expanding a text field into a textarea
- add CSS classes to the labels and input fields
Adding fields to a form
You can add a field to a form and the database relatively easy.
- Add the field to the overriding XML file.
- Next, add this field tot he layout file for the view associated with the XML file.
- Finally, using phpMyAdmin (or some similar tool to edit the database) add the field to the corresponding database table. (This is safe as component upgrades will not change db fields it does not know about.)
That should be all that you need to do. No core files need to be hacked.
About the XML files
The core components (Content, Contacts, Web Links, etc.) demonstrate how JForm and the XML files are used. The name of the XML file corresponds to the name of the view that will be referencing it.
Form Fields Manager - admin tool
The component FormFieldsMgr (by iCue Project) automates much of the work through a configuration screen. Further, it allows you to created multiple profiles with each profile having its own form field configuration per component. This tool is intended for tailoring the edit forms in the backend to the needs of the client, site managers, and content authors.
this plugin is provided by the iCue Project
...learn more about other extensions and products by the iCue Project
...learn more about the iCue Project.