import { Components } from "gd-sprest-bs";// Create the formlet el = document.querySelector("#myForm");let form = Components.Form({ el: el, rows: [ { control: { label: "First Name:", name: "FName", type: Components.FormControlTypes.TextField } }, { control: { label: "Last Name:", name: "LName", type: Components.FormControlTypes.TextField } }, { control: { label: "Choices:", name: "Choice", type: Components.FormControlTypes.Dropdown, items: [ { text: "Choice 1", value: "1" }, { text: "Choice 2", value: "2" }, { text: "Choice 3", value: "3" }, { text: "Choice 4", value: "4" }, { text: "Choice 5", value: "5" } ] } } ], value: { FName: "Gunjan", LName: "Datta", Choice: "3" }}); Copy
import { Components } from "gd-sprest-bs";// Create the formlet el = document.querySelector("#myForm");let form = Components.Form({ el: el, rows: [ { control: { label: "First Name:", name: "FName", type: Components.FormControlTypes.TextField } }, { control: { label: "Last Name:", name: "LName", type: Components.FormControlTypes.TextField } }, { control: { label: "Choices:", name: "Choice", type: Components.FormControlTypes.Dropdown, items: [ { text: "Choice 1", value: "1" }, { text: "Choice 2", value: "2" }, { text: "Choice 3", value: "3" }, { text: "Choice 4", value: "4" }, { text: "Choice 5", value: "5" } ] } } ], value: { FName: "Gunjan", LName: "Datta", Choice: "3" }});
Generated using TypeDoc
Form