<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>CheckBox visibility Function</title><link>https://community.appian.com/discussions/f/user-interface/24835/checkbox-visibility-function</link><description>i want to display a text box only when a check box is been clicked. what can i do to achieve that?</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: CheckBox visibility Function</title><link>https://community.appian.com/thread/96089?ContentTypeID=1</link><pubDate>Wed, 08 Jun 2022 06:24:20 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:bd5b2b8d-fec2-4c9a-9fca-2bb25f5996d4</guid><dc:creator>harshjan</dc:creator><description>&lt;p&gt;hi, if you want to display specific box or multiple boxes while selecting the check box, then you can modify the below code as you desire.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!selectedBox,
  {
    a!checkboxField(
      choiceLabels: { &amp;quot;a&amp;quot;, &amp;quot;b&amp;quot; },
      choiceValues: { 1, 2 },
      value: local!selectedBox,
      saveInto: local!selectedBox,

    ),
    a!textField(
      showWhen: {
        and(
          a!isNotNullOrEmpty(local!selectedBox),
          local!selectedBox = 1
        )
      },
      label: &amp;quot;text field 1&amp;quot;
    ),
    a!textField(
      showWhen: {
        and(
          a!isNotNullOrEmpty(local!selectedBox),
          local!selectedBox = 2
        )
      },
      label: &amp;quot;text field 2&amp;quot;
    )
  }
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CheckBox visibility Function</title><link>https://community.appian.com/thread/96087?ContentTypeID=1</link><pubDate>Wed, 08 Jun 2022 06:12:35 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:48fa9953-6940-41e6-a50f-22708bec019e</guid><dc:creator>GopalK</dc:creator><description>&lt;p&gt;hi, Please go through below sample code and you can modify according to your requirements. The idea here is to configure the &amp;quot;showWhen&amp;quot; parameter of the text field. configure this parameter with a boolean variable which gets changed based on checkbox selection.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!selectedChoice:false,
  {
    a!checkboxField(
      label: &amp;quot;checkbox&amp;quot;,
      choiceLabels: {&amp;quot;Yes&amp;quot;,&amp;quot;No&amp;quot;},
      choiceValues: {true,false},
      value: local!selectedChoice,
      saveInto: local!selectedChoice
    ),
    a!textField(
      label: &amp;quot;text field&amp;quot;,
      showWhen: local!selectedChoice
    )
  }
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>