Conditional Field Display Customizing Forms Based on Global Settings
From Joomla! Documentation
Introduction[edit]
The Conditional Field Display feature, introduced in Joomla 5.2, improves the handling of form fields that are based on global settings. Previously, conditional fields that relied on the "Use Global" option did not display as expected when global options were applied. This update introduces a new data attribute, `data-global`, which ensures that fields adapt automatically based on the global configuration.
How the Conditional Field Display Works[edit]
With the addition of the `data-global` attribute to the select options in forms, any field that uses the "Use Global" setting now dynamically displays according to the global configuration. For example, if you have set global settings to display fields such as phone numbers or addresses in the contact forms, these fields will automatically show without further manual intervention when editing or adding a new contact.
This change enhances the flexibility of form management, ensuring that global settings are respected throughout the system and reflected correctly in individual form entries.
How to Access[edit]
To take advantage of the Conditional Field Display feature:
- Navigate to Global Configuration -> Contacts -> Options.
- Under the Contact Information tab, ensure that relevant fields are set to Show.
- Open an existing contact or create a new one. Under the Display tab, select Use Global (Show) for the fields you wish to display based on the global configuration.
Additional Notes[edit]
Ensure that the global settings are configured correctly in the Global Configuration for the feature to function as expected. The system will automatically adjust the form fields based on these settings, simplifying the management of forms across your Joomla site.
Note on the Feature's Origin[edit]
This feature was added in Joomla 5.2 via the improvement introduced in #43842.