Hi Team,
I was able to link each checkbox to each panel with below approach:
`
`
Now I would like to have ALL as an option.
How can I link one checkbox with all panels?
I don't want to use Javascript/CSS. just basic configuration should do.
I also tried below but it is not working. copying token to all panels.
<panel id="panel2" depends=**"$showPanel2$,$ALL$"**>
screenshot below:
@sagar1992 try the following run anywhere example and confirm whether it suits the needs.
<form>
<label>CheckBox All</label>
<fieldset submitButton="false"></fieldset>
<row>
<panel>
<input type="checkbox" token="tokAllReports">
<label>All</label>
<choice value="all_reports">Reports</choice>
<change>
<condition value="all_reports">
<!-- Set all other checkboxes to show all reports -->
<set token="form.tokMonthlyReports">monthly_reports</set>
<set token="form.tokDailyReports">daily_reports</set>
</condition>
<condition>
<!-- Unset all other checkboxes to hide all reports -->
<unset token="form.tokMonthlyReports"></unset>
<unset token="form.tokDailyReports"></unset>
</condition>
</change>
</input>
<input type="checkbox" token="tokMonthlyReports">
<label></label>
<choice value="monthly_reports">Monthly Reports</choice>
<change>
<condition value="monthly_reports">
<!-- Show monthly report -->
<set token="tokShowPanelMonthly">true</set>
</condition>
<condition>
<!-- Hide monthly report -->
<unset token="tokShowPanelMonthly"></unset>
</condition>
</change>
</input>
<input type="checkbox" token="tokDailyReports">
<label></label>
<choice value="daily_reports">Daily Reports</choice>
<change>
<condition value="daily_reports">
<!-- Show daily report -->
<set token="tokShowPanelDaily">true</set>
</condition>
<condition>
<!-- Hide daily report -->
<unset token="tokShowPanelDaily"></unset>
</condition>
</change>
</input>
</panel>
</row>
<row>
<panel id="panelMonthly" depends="$tokShowPanelMonthly$">
<html>
<div>
<h3>Monhtly Report Panel</h3>
</div>
</html>
</panel>
<panel id="panelDaily" depends="$tokShowPanelDaily$">
<html>
<div>
<h3>Daily Report Panel</h3>
</div>
</html>
</panel>
</row>
</form>
@sagar1992 try the following run anywhere example and confirm whether it suits the needs.
<form>
<label>CheckBox All</label>
<fieldset submitButton="false"></fieldset>
<row>
<panel>
<input type="checkbox" token="tokAllReports">
<label>All</label>
<choice value="all_reports">Reports</choice>
<change>
<condition value="all_reports">
<!-- Set all other checkboxes to show all reports -->
<set token="form.tokMonthlyReports">monthly_reports</set>
<set token="form.tokDailyReports">daily_reports</set>
</condition>
<condition>
<!-- Unset all other checkboxes to hide all reports -->
<unset token="form.tokMonthlyReports"></unset>
<unset token="form.tokDailyReports"></unset>
</condition>
</change>
</input>
<input type="checkbox" token="tokMonthlyReports">
<label></label>
<choice value="monthly_reports">Monthly Reports</choice>
<change>
<condition value="monthly_reports">
<!-- Show monthly report -->
<set token="tokShowPanelMonthly">true</set>
</condition>
<condition>
<!-- Hide monthly report -->
<unset token="tokShowPanelMonthly"></unset>
</condition>
</change>
</input>
<input type="checkbox" token="tokDailyReports">
<label></label>
<choice value="daily_reports">Daily Reports</choice>
<change>
<condition value="daily_reports">
<!-- Show daily report -->
<set token="tokShowPanelDaily">true</set>
</condition>
<condition>
<!-- Hide daily report -->
<unset token="tokShowPanelDaily"></unset>
</condition>
</change>
</input>
</panel>
</row>
<row>
<panel id="panelMonthly" depends="$tokShowPanelMonthly$">
<html>
<div>
<h3>Monhtly Report Panel</h3>
</div>
</html>
</panel>
<panel id="panelDaily" depends="$tokShowPanelDaily$">
<html>
<div>
<h3>Daily Report Panel</h3>
</div>
</html>
</panel>
</row>
</form>
Hello @niketnilay,
added below tags according to my needs, and it worked.
<input type="checkbox" token="tokAllReports" searchWhenChanged="true">
<label>All</label>
<choice value="all_reports">All Reports</choice>
<change>
<condition value="all_reports">
<!-- Set all other checkboxes to show all reports -->
<set token="form.showPanel1">monthly_reports</set>
<set token="form.showPanel5">daily_reports</set>
<set token="form.showPanel2">monthly_reports</set>
<set token="form.showPanel6">daily_reports</set>
<set token="form.showPanel3">monthly_reports</set>
<set token="form.showPanel4">monthly_reports</set>
</condition>
<condition>
<!-- Unset all other checkboxes to hide all reports -->
<unset token="form.showPanel1"></unset>
<unset token="form.showPanel5"></unset>
<unset token="form.showPanel2"></unset>
<unset token="form.showPanel6"></unset>
<unset token="form.showPanel3"></unset>
<unset token="form.showPanel4"></unset>
</condition>
</change>
</input>
Thank you so much!! looks good. 🙂
Happy Sunday.
:)
Happy Weekend to you too!