I have a form field which needs to be shown depending on value selected for another field. For example

<field name="field1" type="list" label="LABEL1" description="DESC1" filter="intval" size="1" default="0" class="form-control">
  <option value="0">Option 0</option>
  <option value="1">Option 1</option>
<field name="field2" showon="field1:1" type="list" label="LABEL2" description="DESC2" filter="intval" size="1" default="0" class="form-control">
  <option value="3">Option 3</option>
  <option value="4">Option 4</option>

In my above code, field2 will be shown only when field1 value is 1. This works fine from the front-end form. However the same form does not work in my admin component. Is there any special JavaScript file needs to be loaded for this to work?


1 Answer 1


Found what the issue is. I was using getInput function to show the field.


but showon attribute working only if I render the field using renderField function


Hope this helps someone facing the same issue

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.