Conditional Fields DJ-Classifieds App
The principle of conditional fields is simple - when editing a custom field, you can specify a dependency when that field is displayed. The chosen custom field will appear only if a specific value is selected in another custom field.
Conditional fields can be used in Category, Contact, Profile, and Ask Seller Form ( so wherever this setting is possible when creating a new custom field.)
Conditional fields App
This feature works thanks to the “DJ-Classifieds - Conditional Fields” app that needs to be installed separately. This app is purposed for adding conditional fields functionality The package installation process is the same as any other Joomla extension installation.
The conditional fields App is free to download for all active DJ-Classifieds extension subscribers.
After successful installation, navigate to System -> Manage -> Plugins -> DJ-Classifieds - Conditional Fields and enable the plugin.
After switching on, a new tab “Conditional fields” will appear in the newly created or edited field:
![](/templates/yootheme/cache/2b/conditional1-2b6c988d.png)
- Trigger field - select the custom field that will cause this field to show up (after providing the value/values specified below)
- Trigger value - specify the value/values of the trigger field that will cause this field to show up.
Example
Settings
Open your DJ-Classifieds control panel and navigate to "Fields". Click "new" to create a new field.
Let’s start with the custom field with Used/New values. See the example settings (marked fields are important for this effect):
![](/templates/yootheme/cache/6e/conditional2-6eef5935.png)
The next step is a new custom field with Good/Bad values. See the example settings below:
![](/templates/yootheme/cache/1d/conditional3-1d3205da.png)
Additionally, it is required to configure the “Conditional fields” tab here. It’s because we need to specify the condition to happen.
![](/templates/yootheme/cache/14/conditional4-148d302f.png)
Now, after that configuration, when the user posts and advert and choose the "Used" as the condition, the new extra field will appear with "Good" and "Bad" options to select.
The final effect
Conditional fields work in the submission form (when adding an advert) and in the Search/Filters module.
See the final effect in the Advert Submission form:
See the final effect in Search & Filter module: