<?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>How to combine radio button and text</title><link>https://community.appian.com/discussions/f/user-interface/25608/how-to-combine-radio-button-and-text</link><description>Hi Appian Community, 
 I have added into my interface a radio button below, 
 It contains radio button, EX: when I choose &amp;#39;Age&amp;#39;, I will can type in text. 
 
 
 
 In my solution, I try create 2 radio button: one radio button &amp;#39;Age&amp;#39; + text box and one radio</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: How to combine radio button and text</title><link>https://community.appian.com/thread/100327?ContentTypeID=1</link><pubDate>Tue, 30 Aug 2022 08:33:46 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:569e5206-2baf-4463-b6de-f1c64759b42d</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!child,
  local!data,
  a!boxLayout(
    label: &amp;quot;CHILD BENEFIT AMOUNT OF BENEFIT&amp;quot;,
    contents: {
      a!sideBySideLayout(
        items: {
          a!sideBySideItem(
            item: a!radioButtonField(
              label: &amp;quot;&amp;quot;,
              labelPosition: &amp;quot;ABOVE&amp;quot;,
              choiceLabels: { &amp;quot;Benefit amount: &amp;quot; },
              choiceValues: { &amp;quot;Benefit amount&amp;quot; },
              value: if(
                local!child = &amp;quot;Benefit amount&amp;quot;,
                &amp;quot;Benefit amount&amp;quot;,
                null
              ),
              saveInto: local!child,
              choiceLayout: &amp;quot;STACKED&amp;quot;,
              validations: {}
            ),
            width: &amp;quot;MINIMIZE&amp;quot;
          ),
          a!sideBySideItem(
            item: a!textField(
              label: &amp;quot;&amp;quot;,
              labelPosition: &amp;quot;COLLAPSED&amp;quot;,
              value: if(local!child = &amp;quot;Benefit amount&amp;quot;, local!data,&amp;quot;&amp;quot;),
              saveInto: a!save(
                if(local!child = &amp;quot;Benefit amount&amp;quot;, local!data,&amp;quot;&amp;quot;),
                save!value
              ),
              refreshAfter: &amp;quot;UNFOCUS&amp;quot;,
              showWhen: true,
              disabled: if(
                local!child = &amp;quot;Benefit amount&amp;quot;,
                false,
                true
              ),
              validations: {}
            ),
            width: &amp;quot;MINIMIZE&amp;quot;
          )
        }
      ),
      a!sideBySideLayout(
        items: {
          a!sideBySideItem(
            item: a!radioButtonField(
              label: &amp;quot;&amp;quot;,
              labelPosition: &amp;quot;ABOVE&amp;quot;,
              choiceLabels: { &amp;quot;Other:&amp;quot; },
              choiceValues: { &amp;quot;Other&amp;quot; },
              value: if(
                local!child = &amp;quot;Other&amp;quot;,
                &amp;quot;Other&amp;quot;,
                null
              ),
              saveInto: local!child,
              choiceLayout: &amp;quot;STACKED&amp;quot;,
              validations: {}
            ),
            width: &amp;quot;MINIMIZE&amp;quot;
          ),
          a!sideBySideItem(
            item: a!textField(
              label: &amp;quot;&amp;quot;,
              labelPosition: &amp;quot;COLLAPSED&amp;quot;,
              value: if( local!child = &amp;quot;Other&amp;quot;, local!data, &amp;quot;&amp;quot;),
              saveInto: a!save(
                if(
                  local!child = &amp;quot;Other&amp;quot;,
                  local!data,
                  &amp;quot;&amp;quot;
                ),
                save!value
              ),
              refreshAfter: &amp;quot;UNFOCUS&amp;quot;,
              readOnly: false,
              disabled: if(
                local!child= &amp;quot;Other&amp;quot;,
                false,
                true
              ),
              validations: {}
            ),
            width: &amp;quot;MINIMIZE&amp;quot;
          )
        }
      )
    },
    style: &amp;quot;STANDARD&amp;quot;,
    marginBelow: &amp;quot;STANDARD&amp;quot;
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to combine radio button and text</title><link>https://community.appian.com/thread/100326?ContentTypeID=1</link><pubDate>Tue, 30 Aug 2022 07:47:55 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ce71ec76-7c76-4918-bf68-f4df647de109</guid><dc:creator>khuuduong</dc:creator><description>&lt;p&gt;Yes, my&lt;span&gt;&amp;nbsp;&amp;quot;Benefit Amount&amp;quot; textField is missing the value parameter which is &amp;quot;value&amp;quot; parameter.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I will explain my issue in more detail.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Both textField is used to save a same value&lt;/p&gt;
&lt;p&gt;When I choose radioButton&amp;nbsp;&lt;span&gt;Benefit amount, enter value for textField next to it is :123&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If I choose another radioButton (Other), &lt;strong&gt;textField next to must is blank&lt;/strong&gt;, but it&amp;#39;s value: 123&lt;/span&gt;&lt;/p&gt;
&lt;div class="eJOY__extension_root_class" id="eJOY__extension_root"&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to combine radio button and text</title><link>https://community.appian.com/thread/100318?ContentTypeID=1</link><pubDate>Tue, 30 Aug 2022 06:24:06 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6c0093e2-8d32-40a8-872b-76c64013ef70</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;I do not really understand your issue. Please explain in more detail.&lt;/p&gt;
&lt;p&gt;Your &amp;quot;Benefit Amount&amp;quot; textField is missing the value parameter.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to combine radio button and text</title><link>https://community.appian.com/thread/100316?ContentTypeID=1</link><pubDate>Tue, 30 Aug 2022 02:08:14 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:39ed3e5e-e161-4a51-b32e-93467d2719d9</guid><dc:creator>khuuduong</dc:creator><description>&lt;p&gt;Hi guy,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I do follow your code snippet and success.&lt;/p&gt;
&lt;p&gt;But I have a new issue,&lt;/p&gt;
&lt;p&gt;If I want save database, I can&amp;#39;t save correct value that I enter text box.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/13/pastedimage1661824785120v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;In&amp;nbsp;assumption, local!data is a field in database will save text box&lt;/p&gt;
&lt;p&gt;This my snippet code below&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;  a!localVariables(
    local!child,
    local!data,
    a!boxLayout(
      label: &amp;quot;CHILD BENEFIT AMOUNT OF BENEFIT&amp;quot;,
      contents: {
        a!sideBySideLayout(
          items: {
            a!sideBySideItem(
              item: a!radioButtonField(
                label: &amp;quot;&amp;quot;,
                labelPosition: &amp;quot;ABOVE&amp;quot;,
                choiceLabels: { &amp;quot;Benefit amount: &amp;quot; },
                choiceValues: { &amp;quot;Benefit amount&amp;quot; },
                value: if(
                  local!child = &amp;quot;Benefit amount&amp;quot;,
                  &amp;quot;Benefit amount&amp;quot;,
                  null
                ),
                saveInto: local!child,
                choiceLayout: &amp;quot;STACKED&amp;quot;,
                validations: {}
              ),
              width: &amp;quot;MINIMIZE&amp;quot;
            ),
            a!sideBySideItem(
              item: a!textField(
                label: &amp;quot;&amp;quot;,
                labelPosition: &amp;quot;COLLAPSED&amp;quot;,
                saveInto: a!save(
                  if(local!child = &amp;quot;Benefit amount&amp;quot;, local!data,&amp;quot;&amp;quot;),
                  save!value
                ),
                refreshAfter: &amp;quot;UNFOCUS&amp;quot;,
                showWhen: true,
                disabled: if(
                  local!child = &amp;quot;Benefit amount&amp;quot;,
                  false,
                  true
                ),
                validations: {}
              ),
              width: &amp;quot;MINIMIZE&amp;quot;
            )
          }
        ),
        a!sideBySideLayout(
          items: {
            a!sideBySideItem(
              item: a!radioButtonField(
                label: &amp;quot;&amp;quot;,
                labelPosition: &amp;quot;ABOVE&amp;quot;,
                choiceLabels: { &amp;quot;Other:&amp;quot; },
                choiceValues: { &amp;quot;Other&amp;quot; },
                value: if(
                  local!child = &amp;quot;Other&amp;quot;,
                  &amp;quot;Other&amp;quot;,
                  null
                ),
                saveInto: local!child,
                choiceLayout: &amp;quot;STACKED&amp;quot;,
                validations: {}
              ),
              width: &amp;quot;MINIMIZE&amp;quot;
            ),
            a!sideBySideItem(
              item: a!textField(
                label: &amp;quot;&amp;quot;,
                labelPosition: &amp;quot;COLLAPSED&amp;quot;,
                value: local!data,
                saveInto: a!save(
                  if(
                    local!child = &amp;quot;Other&amp;quot;,
                    local!data,
                    &amp;quot;&amp;quot;
                  ),
                  save!value
                ),
                refreshAfter: &amp;quot;UNFOCUS&amp;quot;,
                readOnly: false,
                disabled: if(
                  local!child= &amp;quot;Other&amp;quot;,
                  false,
                  true
                ),
                validations: {}
              ),
              width: &amp;quot;MINIMIZE&amp;quot;
            )
          }
        )
      },
      style: &amp;quot;STANDARD&amp;quot;,
      marginBelow: &amp;quot;STANDARD&amp;quot;
    )
  )
&lt;/pre&gt;&lt;/p&gt;
&lt;div class="eJOY__extension_root_class" id="eJOY__extension_root"&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to combine radio button and text</title><link>https://community.appian.com/thread/100068?ContentTypeID=1</link><pubDate>Wed, 24 Aug 2022 09:31:03 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:624e836c-6777-46a2-932d-305c970c3729</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;When you check my code snippet, you will see that both radio button components use the same locale variable in the saveInto. You use two separate locals.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to combine radio button and text</title><link>https://community.appian.com/thread/100067?ContentTypeID=1</link><pubDate>Wed, 24 Aug 2022 09:26:57 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b21bd811-1baa-4039-b7d5-a2461a9c4ebe</guid><dc:creator>khuuduong</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!age,
  local!noAge,
  local!age1,
  local!noAge1,
  {
    a!sectionLayout(
      label: &amp;quot;EMPLOYEE ELIGIBILITY&amp;quot;,
      labelColor: &amp;quot;#000000&amp;quot;,
      contents: {
        a!boxLayout(
          label: &amp;quot;Question 1&amp;quot;,
          contents: {
            a!sideBySideLayout(
              items: {
                a!sideBySideItem(
                  item: a!radioButtonField(
                    label: &amp;quot;&amp;quot;,
                    labelPosition: &amp;quot;ABOVE&amp;quot;,
                    choiceLabels: { &amp;quot;Age&amp;quot; },
                    choiceValues: { &amp;quot;Age&amp;quot; },
                    value: if(local!age = &amp;quot;Age&amp;quot;, &amp;quot;Age&amp;quot;, null),
                    saveInto: {local!age},
                    choiceLayout: &amp;quot;STACKED&amp;quot;,
                    validations: {}
                  ),
                  width: &amp;quot;MINIMIZE&amp;quot;
                ),
                a!sideBySideItem(
                  item: a!textField(
                    label: &amp;quot;&amp;quot;,
                    labelPosition: &amp;quot;COLLAPSED&amp;quot;,
                    refreshAfter: &amp;quot;UNFOCUS&amp;quot;,
                    validations: {}
                  )
                ),
                a!sideBySideItem(
                  item: a!textField(
                    label: &amp;quot;&amp;quot;,
                    labelPosition: &amp;quot;ABOVE&amp;quot;,
                    saveInto: {},
                    refreshAfter: &amp;quot;UNFOCUS&amp;quot;,
                    readOnly: true,
                    validations: {}
                  ),
                  width: &amp;quot;8X&amp;quot;
                )
              }
            ),
            a!radioButtonField(
              label: &amp;quot;&amp;quot;,
              labelPosition: &amp;quot;COLLAPSED&amp;quot;,
              choiceLabels: {&amp;quot;No Age limit for enrollment&amp;quot;},
              choiceValues: {&amp;quot;No Age&amp;quot;},
              value: if(local!noAge = &amp;quot;No Age&amp;quot;, &amp;quot;No Age&amp;quot;, null),
              saveInto: {local!noAge},
              choiceLayout: &amp;quot;STACKED&amp;quot;,
              validations: {}
            )
          },
          style: &amp;quot;STANDARD&amp;quot;,
          marginBelow: &amp;quot;STANDARD&amp;quot;
        ),
        a!boxLayout(
          label: &amp;quot;Question 2&amp;quot;,
          contents: {
            a!richTextDisplayField(
              labelPosition: &amp;quot;COLLAPSED&amp;quot;,
              value: {
                a!richTextItem(
                  text: {
                    &amp;quot;How old?&amp;quot;
                  },
                  size: &amp;quot;STANDARD&amp;quot;,
                  style: {
                    &amp;quot;STRONG&amp;quot;
                  }
                )
              }
            ),
            a!sideBySideLayout(
              items: {
                a!sideBySideItem(
                  item: a!radioButtonField(
                    label: &amp;quot;&amp;quot;,
                    labelPosition: &amp;quot;ABOVE&amp;quot;,
                    choiceLabels: { &amp;quot;Age&amp;quot; },
                    choiceValues: { &amp;quot;Age&amp;quot; },
                    value: if(local!age1 = &amp;quot;Age&amp;quot;, &amp;quot;Age&amp;quot;, null),
                    saveInto: {local!age1},
                    choiceLayout: &amp;quot;STACKED&amp;quot;,
                    validations: {}
                  ),
                  width: &amp;quot;MINIMIZE&amp;quot;
                ),
                a!sideBySideItem(
                  item: a!textField(
                    label: &amp;quot;&amp;quot;,
                    labelPosition: &amp;quot;COLLAPSED&amp;quot;,
                    refreshAfter: &amp;quot;UNFOCUS&amp;quot;,
                    validations: {}
                  ),
                  width: &amp;quot;AUTO&amp;quot;
                ),
                a!sideBySideItem(
                  item: a!textField(
                    label: &amp;quot;&amp;quot;,
                    labelPosition: &amp;quot;ABOVE&amp;quot;,
                    saveInto: {},
                    refreshAfter: &amp;quot;UNFOCUS&amp;quot;,
                    readOnly: true,
                    validations: {}
                  ),
                  width: &amp;quot;8X&amp;quot;
                )
              }
            ),
            a!radioButtonField(
              label: &amp;quot;&amp;quot;,
              labelPosition: &amp;quot;ABOVE&amp;quot;,
              choiceLabels: { &amp;quot;No Minimum Age&amp;quot; },
              choiceValues: { &amp;quot;No&amp;quot; },
              value: if(local!noAge1 = &amp;quot;No&amp;quot;, &amp;quot;No&amp;quot;, null),
              saveInto: {local!noAge1},
              choiceLayout: &amp;quot;STACKED&amp;quot;,
              validations: {}
            )
          },
          style: &amp;quot;STANDARD&amp;quot;,
          marginAbove: &amp;quot;NONE&amp;quot;,
          marginBelow: &amp;quot;NONE&amp;quot;
        )
  
      }
    )

  }
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;If I choose any radio button, local variable is saved, but it can not refresh. I can not uncheck, so that t&lt;span&gt;he options it chooses uncorrectly&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to combine radio button and text</title><link>https://community.appian.com/thread/100058?ContentTypeID=1</link><pubDate>Wed, 24 Aug 2022 06:32:18 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:149e854a-0a99-4d7b-ba46-c03c3c7e5a62</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!radio,
  local!age,
  {
    a!sideBySideLayout(
      alignVertical: &amp;quot;MIDDLE&amp;quot;,
      items: {
        a!sideBySideItem(
          width: &amp;quot;MINIMIZE&amp;quot;,
          item: a!radioButtonField(
            label: &amp;quot;Radio Buttons&amp;quot;,
            labelPosition: &amp;quot;COLLAPSED&amp;quot;,
            choiceLabels: {&amp;quot;Age&amp;quot;},
            choiceValues: {&amp;quot;AGE&amp;quot;},
            value: if(local!radio = &amp;quot;AGE&amp;quot;, &amp;quot;AGE&amp;quot;, null),
            saveInto: local!radio,
            choiceLayout: &amp;quot;STACKED&amp;quot;,
          )
        ),
        a!sideBySideItem(
          showWhen: local!radio = &amp;quot;AGE&amp;quot;,
          item: a!textField(
            label: &amp;quot;Text&amp;quot;,
            labelPosition: &amp;quot;COLLAPSED&amp;quot;,
            saveInto: {},
            refreshAfter: &amp;quot;UNFOCUS&amp;quot;,
            validations: {}
          )
        )
      }
    ),
    a!radioButtonField(
      label: &amp;quot;Radio Buttons&amp;quot;,
      labelPosition: &amp;quot;COLLAPSED&amp;quot;,
      choiceLabels: {&amp;quot;No&amp;quot;},
      choiceValues: {&amp;quot;NO&amp;quot;},
      value: if(local!radio = &amp;quot;NO&amp;quot;, &amp;quot;NO&amp;quot;, null),
      saveInto: local!radio,
      choiceLayout: &amp;quot;STACKED&amp;quot;,
    )
  }
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>