I'm creating a simple add-on which has two checkboxes.
However, the second is only available if the first checkbox is selected.
I've been playing around with various things, but can't quite get my head around <sub_options></sub_options>.
I've looked at the master options.xml file but it's not that helpful.
Can anyone explain in simple terms how to achieve this?
Can it be done from within the .xml or does it require an additional options template?
This is what I have at the moment:
I'd like the second "suboption1" to be a child of the first "option1".
However, the second is only available if the first checkbox is selected.
I've been playing around with various things, but can't quite get my head around <sub_options></sub_options>.
I've looked at the master options.xml file but it's not that helpful.
Can anyone explain in simple terms how to achieve this?
Can it be done from within the .xml or does it require an additional options template?
This is what I have at the moment:
Code:
<optiongroups>
<group group_id="cta_options" display_order="1" debug_only="0"/>
<option option_id="cta_option1_active" edit_format="onoff" data_type="boolean" can_backup="1">
<default_value>1</default_value>
<edit_format_params></edit_format_params>
<sub_options></sub_options>
<relation group_id="cta_options" display_order="10"/>
</option>
<option option_id="cta_suboption1_active" edit_format="onoff" data_type="boolean" can_backup="1">
<default_value>1</default_value>
<edit_format_params></edit_format_params>
<sub_options></sub_options>
<relation group_id="cta_options" display_order="20"/>
</option>
</optiongroups>
I'd like the second "suboption1" to be a child of the first "option1".