I want to click on yes, it will show the contents and click on it to hide it [![enter image description here][1]][1]

1 Answer 1


You can use depends tag just like follow.

<field id="enable" translate="label" type="select" showInDefault="1" showInWebsite="1" showInStore="1" sortOrder="20">
    <label>Enable Module</label>

<field id="upload_file_csv" translate="label" type="text" showInDefault="1" showInWebsite="1" showInStore="1" sortOrder="30">
    <label>Upload file csv</label>
        <field id="enable">1</field>

Second field depends on value of first field 1(Yes).

  • Please accept answer so that it may help others as well.
    – Yash Shah
    Feb 18, 2019 at 6:22

Your Answer

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

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