<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Restrict text field by two words only in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/restrict-text-field-by-two-words-only/m-p/1263031#M47740</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I would like restrict the user to input in a text field until 2 words, separeted by comma.&lt;/P&gt;&lt;P&gt;It´s possible in survey connect 123?&lt;/P&gt;&lt;P&gt;Eg. Car Cat = Correct (2 words and 1 space)&lt;/P&gt;&lt;P&gt;Car Cat Ball = Wrong (3 Words inputed)&lt;/P&gt;&lt;P&gt;Thank´s&lt;/P&gt;</description>
    <pubDate>Wed, 01 Mar 2023 14:37:00 GMT</pubDate>
    <dc:creator>SoratoMarques</dc:creator>
    <dc:date>2023-03-01T14:37:00Z</dc:date>
    <item>
      <title>Restrict text field by two words only</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/restrict-text-field-by-two-words-only/m-p/1263031#M47740</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I would like restrict the user to input in a text field until 2 words, separeted by comma.&lt;/P&gt;&lt;P&gt;It´s possible in survey connect 123?&lt;/P&gt;&lt;P&gt;Eg. Car Cat = Correct (2 words and 1 space)&lt;/P&gt;&lt;P&gt;Car Cat Ball = Wrong (3 Words inputed)&lt;/P&gt;&lt;P&gt;Thank´s&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2023 14:37:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/restrict-text-field-by-two-words-only/m-p/1263031#M47740</guid>
      <dc:creator>SoratoMarques</dc:creator>
      <dc:date>2023-03-01T14:37:00Z</dc:date>
    </item>
    <item>
      <title>Re: Restrict text field by two words only</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/restrict-text-field-by-two-words-only/m-p/1263239#M47752</link>
      <description>&lt;P&gt;A couple of ideas:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Use a regular expression in the constraint column. For example&amp;nbsp;&lt;EM&gt;regex(${input_text},".[,].")&lt;/EM&gt;&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="IsmaelChivite_0-1677700707114.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/64081i966ADEE603D6B854/image-size/large?v=v2&amp;amp;px=999" role="button" title="IsmaelChivite_0-1677700707114.png" alt="IsmaelChivite_0-1677700707114.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Use a custom JS function to define the logic of your text evaluation. For example, you could use split on your input text to check if the array with a comma separator has two entries&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="IsmaelChivite_1-1677701066603.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/64083iC55D672F6083708C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="IsmaelChivite_1-1677701066603.png" alt="IsmaelChivite_1-1677701066603.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Attaching both options so you can see them in action. Start with the RegEx one. It is simpler.&amp;nbsp;&lt;/P&gt;&lt;P&gt;If not familiar with custom JS, check this:&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-survey123-blog/extending-survey123-smart-forms-with-custom-js/ba-p/898782" target="_blank"&gt;https://community.esri.com/t5/arcgis-survey123-blog/extending-survey123-smart-forms-with-custom-js/ba-p/898782&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2023 20:06:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/restrict-text-field-by-two-words-only/m-p/1263239#M47752</guid>
      <dc:creator>IsmaelChivite</dc:creator>
      <dc:date>2023-03-01T20:06:22Z</dc:date>
    </item>
    <item>
      <title>Re: Restrict text field by two words only</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/restrict-text-field-by-two-words-only/m-p/1263244#M47754</link>
      <description>&lt;P&gt;Hi Ismael.&lt;/P&gt;&lt;P&gt;I will try. Very interesting!!&lt;/P&gt;&lt;P&gt;Thank´s for your help.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2023 20:20:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/restrict-text-field-by-two-words-only/m-p/1263244#M47754</guid>
      <dc:creator>SoratoMarques</dc:creator>
      <dc:date>2023-03-01T20:20:58Z</dc:date>
    </item>
  </channel>
</rss>

