Is there a plugin in joomla that controls the display or hiding of another field based on the specified field similar to the XML showon attribute, or similar to the conditional logic in the WordPress ACF plugin that can be set directly?


1 Answer 1


I don't think there is a built-in plugin that does something like that and I'm not aware of a custom one (presumably you have searched the JED (extensions directory) but if you are up against the limits of showon (eg wanting a condition that uses a value from a different xml fields spec - showon can conly use values in the same xml) then it is possible to add a custom attribute to a custom field which will implement more complex conditions for rendering the field.

Check the FormHelper::parseShowOnConditions() function which you can use to parse a custom renderon attribute in your custom field type.

$oparr= FormHelper::parseShowOnConditions((string) $this->element['renderon'], '', '');

If this might help then I can give a more complete example if you can clarify an example of exactly what you are trying to achieve.

Another approach I use for conditionally hiding fields in a view search form (for example if the menu entry or request for a view has specified a specific category you might want to hide a category filter field in the search form, but allow it if no category is specified) is to override the /layouts/joomla/searchtools/default/filters.php with an additional element hide=[fieldname] which you can set in order not to show specific field(s) in the search form.

Again I could post more detail if this is what you are trying to achieve.

(disclaimer - I only use J3, so if you are on J4 my answers might not work - it helps to use the j3 or j4 tag on questions)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy