<?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 Switch input question in the editor widget in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/switch-input-question-in-the-editor-widget/m-p/1332790#M82328</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am trying to render switch input question in the editor widget, but I am able to see the dropdown question. Please let me know if I have missed something.&lt;/P&gt;&lt;P&gt;Please find the screenshot attached for the same&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="KarthikeyanShanmugam_0-1695783484019.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/81747i8DF7D1A298A1C4ED/image-size/medium?v=v2&amp;amp;px=400" role="button" title="KarthikeyanShanmugam_0-1695783484019.png" alt="KarthikeyanShanmugam_0-1695783484019.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is the code that I have used&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;  const fields = [
      {
        name: "ObjectID",
        alias: "ObjectID",
        type: "oid"
      }, {
        name: "inspector",
        alias: "Inspector name",
        type: "string"
      }, 
      {
        name: "inspdate",
        alias: "Inspection date",
        type: "date"
      },
      {
        name: "floodinsur",
        alias: "Flood insurance",
        type: "string",
        domain: {
          type: "coded-value",
          name: "floodinsur",
          codedValues: [
            {
              name: "ATM",
              code: "atm",
            },

            {
              name: "Bar",
              code: "bar",
            },

          ]
        }
      },
      {
        // dropdown
        name: "fieldElt",
        alias: "Field ELement",
        type: "string",
        domain: {
          type: "coded-value",
          name: "fieldElt",
          codedValues: [
            {
              name: "ATM", // value
              code: "atm", // key
            },

            {
              name: "Bar",
              code: "bar",
            },

          ]
        }
      },
      {
        name: "fieldEt",
        alias: "Checkbox element",
        type: "string",
        domain: {
          type: "coded-value",
          name: "fieldEt",
          codedValues: [
            {
              name: "Yes",
              code: "yes"
            }
          ]
        }
      }
      
  ];


 const FieldElement6 = new FieldElement({
      fieldName: "fieldEt",
      label: "Switch",
     input: { 
        type: "switch",
        offValue: "yes",
        onValue: "no"
        
      }
    })

const formTemplate = new FormTemplate({
      title: "Inspector report",
      description: "Enter all relevant information below",
      elements: [FieldElement6]
    });

  const layer = new FeatureLayer({
      source: graphics, // client side graphics
      fields,
      outFields: ["*"],
    formTemplate
    })&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;Karthikeyan Shanmugam&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 27 Sep 2023 02:58:33 GMT</pubDate>
    <dc:creator>KarthikeyanShanmugam</dc:creator>
    <dc:date>2023-09-27T02:58:33Z</dc:date>
    <item>
      <title>Switch input question in the editor widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/switch-input-question-in-the-editor-widget/m-p/1332790#M82328</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am trying to render switch input question in the editor widget, but I am able to see the dropdown question. Please let me know if I have missed something.&lt;/P&gt;&lt;P&gt;Please find the screenshot attached for the same&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="KarthikeyanShanmugam_0-1695783484019.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/81747i8DF7D1A298A1C4ED/image-size/medium?v=v2&amp;amp;px=400" role="button" title="KarthikeyanShanmugam_0-1695783484019.png" alt="KarthikeyanShanmugam_0-1695783484019.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is the code that I have used&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;  const fields = [
      {
        name: "ObjectID",
        alias: "ObjectID",
        type: "oid"
      }, {
        name: "inspector",
        alias: "Inspector name",
        type: "string"
      }, 
      {
        name: "inspdate",
        alias: "Inspection date",
        type: "date"
      },
      {
        name: "floodinsur",
        alias: "Flood insurance",
        type: "string",
        domain: {
          type: "coded-value",
          name: "floodinsur",
          codedValues: [
            {
              name: "ATM",
              code: "atm",
            },

            {
              name: "Bar",
              code: "bar",
            },

          ]
        }
      },
      {
        // dropdown
        name: "fieldElt",
        alias: "Field ELement",
        type: "string",
        domain: {
          type: "coded-value",
          name: "fieldElt",
          codedValues: [
            {
              name: "ATM", // value
              code: "atm", // key
            },

            {
              name: "Bar",
              code: "bar",
            },

          ]
        }
      },
      {
        name: "fieldEt",
        alias: "Checkbox element",
        type: "string",
        domain: {
          type: "coded-value",
          name: "fieldEt",
          codedValues: [
            {
              name: "Yes",
              code: "yes"
            }
          ]
        }
      }
      
  ];


 const FieldElement6 = new FieldElement({
      fieldName: "fieldEt",
      label: "Switch",
     input: { 
        type: "switch",
        offValue: "yes",
        onValue: "no"
        
      }
    })

const formTemplate = new FormTemplate({
      title: "Inspector report",
      description: "Enter all relevant information below",
      elements: [FieldElement6]
    });

  const layer = new FeatureLayer({
      source: graphics, // client side graphics
      fields,
      outFields: ["*"],
    formTemplate
    })&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;Karthikeyan Shanmugam&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Sep 2023 02:58:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/switch-input-question-in-the-editor-widget/m-p/1332790#M82328</guid>
      <dc:creator>KarthikeyanShanmugam</dc:creator>
      <dc:date>2023-09-27T02:58:33Z</dc:date>
    </item>
  </channel>
</rss>

