Conditional Fields in VirtueMart Plugin Configuration Using the showon Attribute

Started by sandomatyas, June 03, 2026, 11:01:50 AM

Previous topic - Next topic

sandomatyas

Hi,

When creating a standard Joomla plugin, form fields can use the `showon` attribute to create conditional fields. This is very useful for organizing settings, because some options are only relevant when another field has a specific value.

For example:

```xml
<field name="mode" type="list" label="Mode">
    <option value="simple">Simple</option>
    <option value="advanced">Advanced</option>
</field>

<field name="advanced_option"
       type="text"
       label="Advanced Option"
       showon="mode:advanced" />
```

In this case, the "Advanced Option" field is only displayed when the mode is set to "Advanced".

However, when creating VirtueMart plugins (for example `vmpayment` or `vmshipment` plugins), the fields defined in <vmconfig> do not seem to support the `showon` attribute.

Would it be possible to add support for Joomla's native `showon` functionality in VirtueMart plugin configuration forms?

I think it would make plugin settings much cleaner and easier to organize, especially for plugins with many configuration options.

Thank you.