UNPKG

formio-sfds

Version:
855 lines (742 loc) 72.2 kB
<!doctype html> <html lang="en"> <head> <title>formio-sfds</title> <meta http-equiv="Content-Type" content="text/html;charset=utf-8"> <meta name="viewport" content="width=device-width"> <link rel="stylesheet" href="/sfgov/forms.css"> </head> <body> <div class="page-node-type-form-page"> <div class="form-page formio-sfds"> <div class="px-2"> <h1>formio-sfds@10.0.0</h1> <p> This is the <a href="https://form.io">form.io</a> theme for <a href="https://sf.gov">sf.gov</a> by the <a href="https://sfdigitalservices.github.io">San Francisco Digital Services</a>. Check out <a href="https://github.com/SFDigitalServices/formio-sfds">the GitHub project</a> for more info. </p> <div class="d-flex flex-column flex-md-row"> <div class="pr-md-4 position-relative"> <h2 class="h2 mt-2">Examples</h1> <div style="position: sticky; top: 0;"> <ul id="example-links" class="list-style-none"> <li> <a href="#form-address" class="d-block py-1"> Address (custom component) </a> </li> <li> <a href="#form-autocomplete" class="d-block py-1"> Autocomplete </a> </li> <li> <a href="#form-checkbox" class="d-block py-1"> Checkbox </a> </li> <li> <a href="#form-columns-2" class="d-block py-1"> Columns (2) </a> </li> <li> <a href="#form-columns-3" class="d-block py-1"> Columns (3) </a> </li> <li> <a href="#form-datagrid-with-select" class="d-block py-1"> Datagrid with select </a> </li> <li> <a href="#form-datetime-date-only" class="d-block py-1"> Date (no time) </a> </li> <li> <a href="#form-datetime-default" class="d-block py-1"> Date & time </a> </li> <li> <a href="#form-datetime-chinese-simplified" class="d-block py-1"> Date & time (Chinese simplified) </a> </li> <li> <a href="#form-datetime-chinese" class="d-block py-1"> Date & time (Chinese traditional) </a> </li> <li> <a href="#form-datetime-spanish" class="d-block py-1"> Date & time (Spanish) </a> </li> <li> <a href="#form-day-default" class="d-block py-1"> Day (default) </a> </li> <li> <a href="#form-error-messages" class="d-block py-1"> Error messages </a> </li> <li> <a href="#form-fieldset" class="d-block py-1"> Fieldset </a> </li> <li> <a href="#form-fieldset-well" class="d-block py-1"> Fieldset in a well </a> </li> <li> <a href="#form-fieldset-in-well" class="d-block py-1"> Fieldset in a well </a> </li> <li> <a href="#form-kitchen-sink" class="d-block py-1"> Kitchen sink </a> </li> <li> <a href="#form-multi-file" class="d-block py-1"> Multiple file upload </a> </li> <li> <a href="#form-radio" class="d-block py-1"> Radio </a> </li> <li> <a href="#form-review" class="d-block py-1"> Review (custom component) </a> </li> <li> <a href="#form-review-inline" class="d-block py-1"> Review (inline) </a> </li> <li> <a href="#form-select" class="d-block py-1"> Select </a> </li> <li> <a href="#form-selectboxes" class="d-block py-1"> Select boxes </a> </li> <li> <a href="#form-select-translation" class="d-block py-1"> Select with translations </a> </li> <li> <a href="#form-shared-components" class="d-block py-1"> Shared components </a> </li> <li> <a href="#form-signature" class="d-block py-1"> Signature </a> </li> <li> <a href="#form-single-file" class="d-block py-1"> Single file upload </a> </li> <li> <a href="#form-datetime-time-only" class="d-block py-1"> Time (no date) </a> </li> <li> <a href="#form-us-state" class="d-block py-1"> U.S. state select (custom component) </a> </li> <li> <a href="#form-well" class="d-block py-1"> Well </a> </li> <li> <a href="#form-zip-code" class="d-block py-1"> ZIP code </a> </li> </ul> </div> </div> <div class="mt-2 pt-1"> <section id="address" class="example"> <h2 class="h3"> <a href="#address" class="fg-light-slate no-underline">#</a> Address (custom component) <a href="/examples/address" class="no-underline">↗️</a> </h2> <div class="d-flex flex-items-start"> <div class="col-4"> <sfgov-form id="form-address" style="width: 100%;" data-form="{&quot;components&quot;:[{&quot;type&quot;:&quot;address&quot;,&quot;label&quot;:&quot;This is the label&quot;,&quot;description&quot;:&quot;This is the description&quot;,&quot;tooltip&quot;:&quot;And this is the tooltip&quot;}]}" data-options=""> </sfgov-form> </div> <div class="pl-2"> <label class="fg-light-slate" for="json-address"> Submission data: </label> <sfgov-form-data data-form-id="form-address"> <textarea id="json-address" class="border-grey-4" rows="3" style="width: 100%; resize: vertical;"> </textarea> </sfgov-form-data> </div> </div> </section> <section id="autocomplete" class="example"> <h2 class="h3"> <a href="#autocomplete" class="fg-light-slate no-underline">#</a> Autocomplete <a href="/examples/autocomplete" class="no-underline">↗️</a> </h2> <div class="d-flex flex-items-start"> <div class="col-4"> <sfgov-form id="form-autocomplete" style="width: 100%;" data-form="{&quot;components&quot;:[{&quot;type&quot;:&quot;select&quot;,&quot;key&quot;:&quot;job&quot;,&quot;label&quot;:&quot;Your job&quot;,&quot;tags&quot;:[&quot;autocomplete&quot;],&quot;data&quot;:{&quot;values&quot;:[{&quot;label&quot;:&quot;Healthcare worker&quot;,&quot;value&quot;:&quot;healthCareWorker&quot;},{&quot;label&quot;:&quot;Emergency services&quot;,&quot;value&quot;:&quot;emergencyServices&quot;},{&quot;label&quot;:&quot;Food and agriculture&quot;,&quot;value&quot;:&quot;foodAndAgriculture&quot;},{&quot;label&quot;:&quot;Energy&quot;,&quot;value&quot;:&quot;energy&quot;},{&quot;label&quot;:&quot;Water and wastewater&quot;,&quot;value&quot;:&quot;waterAndWastewater&quot;}]}},{&quot;type&quot;:&quot;select&quot;,&quot;key&quot;:&quot;words&quot;,&quot;label&quot;:&quot;Pick some words&quot;,&quot;tags&quot;:[&quot;autocomplete&quot;],&quot;multiple&quot;:true,&quot;customOptions&quot;:{&quot;maxItemCount&quot;:3},&quot;properties&quot;:{&quot;en:autocomplete.maxItemText&quot;:&quot;Sorry, {{count}} tags max!&quot;},&quot;description&quot;:&quot;This uses &lt;code&gt;multiple&lt;/code&gt; and&#92;n&lt;code&gt;customOptions.maxItemCount&lt;/code&gt; to limit the number of&#92;nchoices, and the &lt;code&gt;autocomplete.maxItemText&lt;/code&gt; translation&#92;nkey to change the text that shows up when two are selected.&#92;n&quot;,&quot;data&quot;:{&quot;values&quot;:[{&quot;label&quot;:&quot;green&quot;,&quot;value&quot;:&quot;green&quot;},{&quot;label&quot;:&quot;empathic&quot;,&quot;value&quot;:&quot;empathic&quot;},{&quot;label&quot;:&quot;never&quot;,&quot;value&quot;:&quot;never&quot;},{&quot;label&quot;:&quot;eleven&quot;,&quot;value&quot;:&quot;eleven&quot;},{&quot;label&quot;:&quot;dry&quot;,&quot;value&quot;:&quot;dry&quot;},{&quot;label&quot;:&quot;valuable&quot;,&quot;value&quot;:&quot;valuable&quot;},{&quot;label&quot;:&quot;fortify&quot;,&quot;value&quot;:&quot;fortify&quot;},{&quot;label&quot;:&quot;whatever&quot;,&quot;value&quot;:&quot;whatever&quot;},{&quot;label&quot;:&quot;leaven&quot;,&quot;value&quot;:&quot;leaven&quot;}]}},{&quot;type&quot;:&quot;htmlelement&quot;,&quot;tag&quot;:&quot;div&quot;,&quot;content&quot;:&quot;&lt;b&gt;ProTip:&lt;/b&gt; Add &lt;a&#92;nhref=&#92;&quot;?language=debug&#92;&quot;&gt;&lt;code&gt;?language=debug&lt;/code&gt;&lt;/a&gt; to the&#92;nquery string to see the &lt;code&gt;autocomplete.*&lt;/code&gt; translation keys&#92;nin context.&#92;n&quot;}]}" data-options="{&quot;i18n&quot;:{&quot;debug&quot;:{&quot;autocomplete.noResultsText&quot;:&quot;autocomplete.noResultsText&quot;,&quot;autocomplete.itemSelectText&quot;:&quot;autocomplete.itemSelectText&quot;,&quot;autocomplete.maxItemText&quot;:&quot;autocomplete.maxItemText&quot;,&quot;autocomplete.noChoicesText&quot;:&quot;autocomplete.noChoicesText&quot;,&quot;autocomplete.searchPlaceholderValue&quot;:&quot;autocomplete.searchPlaceholderValue&quot;}}}"> </sfgov-form> </div> <div class="pl-2"> <label class="fg-light-slate" for="json-autocomplete"> Submission data: </label> <sfgov-form-data data-form-id="form-autocomplete"> <textarea id="json-autocomplete" class="border-grey-4" rows="3" style="width: 100%; resize: vertical;"> </textarea> </sfgov-form-data> </div> </div> </section> <section id="checkbox" class="example"> <h2 class="h3"> <a href="#checkbox" class="fg-light-slate no-underline">#</a> Checkbox <a href="/examples/checkbox" class="no-underline">↗️</a> </h2> <div class="d-flex flex-items-start"> <div class="col-4"> <sfgov-form id="form-checkbox" style="width: 100%;" data-form="{&quot;components&quot;:[{&quot;type&quot;:&quot;checkbox&quot;,&quot;label&quot;:&quot;This is a long label, and it should wrap nicely alongside the checkbox with the description below it.&quot;,&quot;description&quot;:&quot;And this is the description&quot;,&quot;tooltip&quot;:&quot;And this is the tooltip&quot;}]}" data-options=""> </sfgov-form> </div> <div class="pl-2"> <label class="fg-light-slate" for="json-checkbox"> Submission data: </label> <sfgov-form-data data-form-id="form-checkbox"> <textarea id="json-checkbox" class="border-grey-4" rows="3" style="width: 100%; resize: vertical;"> </textarea> </sfgov-form-data> </div> </div> </section> <section id="columns-2" class="example"> <h2 class="h3"> <a href="#columns-2" class="fg-light-slate no-underline">#</a> Columns (2) <a href="/examples/columns-2" class="no-underline">↗️</a> </h2> <div class="d-flex flex-items-start"> <div class="col-4"> <sfgov-form id="form-columns-2" style="width: 100%;" data-form="{&quot;components&quot;:[{&quot;type&quot;:&quot;columns&quot;,&quot;columns&quot;:[{&quot;width&quot;:3,&quot;components&quot;:[{&quot;type&quot;:&quot;textfield&quot;,&quot;key&quot;:&quot;a&quot;,&quot;label&quot;:&quot;Field 1&quot;}]},{&quot;width&quot;:3,&quot;components&quot;:[{&quot;type&quot;:&quot;textfield&quot;,&quot;key&quot;:&quot;b&quot;,&quot;label&quot;:&quot;Field 2&quot;}]}]}]}" data-options=""> </sfgov-form> </div> <div class="pl-2"> <label class="fg-light-slate" for="json-columns-2"> Submission data: </label> <sfgov-form-data data-form-id="form-columns-2"> <textarea id="json-columns-2" class="border-grey-4" rows="3" style="width: 100%; resize: vertical;"> </textarea> </sfgov-form-data> </div> </div> </section> <section id="columns-3" class="example"> <h2 class="h3"> <a href="#columns-3" class="fg-light-slate no-underline">#</a> Columns (3) <a href="/examples/columns-3" class="no-underline">↗️</a> </h2> <div class="d-flex flex-items-start"> <div class="col-4"> <sfgov-form id="form-columns-3" style="width: 100%;" data-form="{&quot;components&quot;:[{&quot;type&quot;:&quot;columns&quot;,&quot;columns&quot;:[{&quot;width&quot;:2,&quot;components&quot;:[{&quot;type&quot;:&quot;textfield&quot;,&quot;key&quot;:&quot;a&quot;,&quot;label&quot;:&quot;Field 1&quot;}]},{&quot;width&quot;:2,&quot;components&quot;:[{&quot;type&quot;:&quot;textfield&quot;,&quot;key&quot;:&quot;b&quot;,&quot;label&quot;:&quot;Field 2&quot;}]},{&quot;width&quot;:2,&quot;components&quot;:[{&quot;type&quot;:&quot;number&quot;,&quot;key&quot;:&quot;c&quot;,&quot;label&quot;:&quot;Field 3&quot;,&quot;defaultValue&quot;:10}]}]}]}" data-options=""> </sfgov-form> </div> <div class="pl-2"> <label class="fg-light-slate" for="json-columns-3"> Submission data: </label> <sfgov-form-data data-form-id="form-columns-3"> <textarea id="json-columns-3" class="border-grey-4" rows="3" style="width: 100%; resize: vertical;"> </textarea> </sfgov-form-data> </div> </div> </section> <section id="datagrid-with-select" class="example"> <h2 class="h3"> <a href="#datagrid-with-select" class="fg-light-slate no-underline">#</a> Datagrid with select <a href="/examples/datagrid-with-select" class="no-underline">↗️</a> </h2> <div class="d-flex flex-items-start"> <div class="col-4"> <sfgov-form id="form-datagrid-with-select" style="width: 100%;" data-form="{&quot;components&quot;:[{&quot;type&quot;:&quot;datagrid&quot;,&quot;input&quot;:true,&quot;label&quot;:&quot;Enter the relevant information for each ADU.&quot;,&quot;reorder&quot;:false,&quot;addAnotherPosition&quot;:&quot;bottom&quot;,&quot;defaultOpen&quot;:false,&quot;layoutFixed&quot;:false,&quot;enableRowGroups&quot;:false,&quot;initEmpty&quot;:false,&quot;tableView&quot;:false,&quot;defaultValue&quot;:[{&quot;proposedUnitType&quot;:&quot;&quot;}],&quot;key&quot;:&quot;proposedAdUs&quot;,&quot;components&quot;:[{&quot;label&quot;:&quot;Select the unit type&quot;,&quot;widget&quot;:&quot;choicesjs&quot;,&quot;tableView&quot;:true,&quot;data&quot;:{&quot;values&quot;:[{&quot;label&quot;:&quot;Studio&quot;,&quot;value&quot;:&quot;Studio&quot;},{&quot;label&quot;:&quot;1 Bedroom&quot;,&quot;value&quot;:&quot;1Bedroom&quot;},{&quot;label&quot;:&quot;2 Bedroom&quot;,&quot;value&quot;:&quot;2Bedroom&quot;},{&quot;label&quot;:&quot;3 Bedroom or more&quot;,&quot;value&quot;:&quot;3Bedroom&quot;}]},&quot;validate&quot;:{&quot;required&quot;:true},&quot;key&quot;:&quot;proposedUnitType&quot;,&quot;type&quot;:&quot;select&quot;,&quot;input&quot;:true,&quot;searchThreshold&quot;:0.3},{&quot;label&quot;:&quot;Square footage&quot;,&quot;mask&quot;:false,&quot;spellcheck&quot;:true,&quot;tableView&quot;:false,&quot;delimiter&quot;:false,&quot;requireDecimal&quot;:false,&quot;inputFormat&quot;:&quot;plain&quot;,&quot;validate&quot;:{&quot;required&quot;:true},&quot;key&quot;:&quot;proposedSquareFootage&quot;,&quot;type&quot;:&quot;number&quot;,&quot;decimalLimit&quot;:0,&quot;input&quot;:true}]}]}" data-options=""> </sfgov-form> </div> <div class="pl-2"> <label class="fg-light-slate" for="json-datagrid-with-select"> Submission data: </label> <sfgov-form-data data-form-id="form-datagrid-with-select"> <textarea id="json-datagrid-with-select" class="border-grey-4" rows="3" style="width: 100%; resize: vertical;"> </textarea> </sfgov-form-data> </div> </div> </section> <section id="datetime-date-only" class="example"> <h2 class="h3"> <a href="#datetime-date-only" class="fg-light-slate no-underline">#</a> Date (no time) <a href="/examples/datetime-date-only" class="no-underline">↗️</a> </h2> <div class="d-flex flex-items-start"> <div class="col-4"> <sfgov-form id="form-datetime-date-only" style="width: 100%;" data-form="{&quot;components&quot;:[{&quot;type&quot;:&quot;datetime&quot;,&quot;label&quot;:&quot;This is the label&quot;,&quot;description&quot;:&quot;This is the description&quot;,&quot;enableTime&quot;:false}]}" data-options=""> </sfgov-form> </div> <div class="pl-2"> <label class="fg-light-slate" for="json-datetime-date-only"> Submission data: </label> <sfgov-form-data data-form-id="form-datetime-date-only"> <textarea id="json-datetime-date-only" class="border-grey-4" rows="3" style="width: 100%; resize: vertical;"> </textarea> </sfgov-form-data> </div> </div> </section> <section id="datetime-default" class="example"> <h2 class="h3"> <a href="#datetime-default" class="fg-light-slate no-underline">#</a> Date & time <a href="/examples/datetime-default" class="no-underline">↗️</a> </h2> <div class="d-flex flex-items-start"> <div class="col-4"> <sfgov-form id="form-datetime-default" style="width: 100%;" data-form="{&quot;components&quot;:[{&quot;type&quot;:&quot;datetime&quot;,&quot;label&quot;:&quot;This is the label&quot;,&quot;description&quot;:&quot;This is the description&quot;}]}" data-options=""> </sfgov-form> </div> <div class="pl-2"> <label class="fg-light-slate" for="json-datetime-default"> Submission data: </label> <sfgov-form-data data-form-id="form-datetime-default"> <textarea id="json-datetime-default" class="border-grey-4" rows="3" style="width: 100%; resize: vertical;"> </textarea> </sfgov-form-data> </div> </div> </section> <section id="datetime-chinese-simplified" class="example"> <h2 class="h3"> <a href="#datetime-chinese-simplified" class="fg-light-slate no-underline">#</a> Date & time (Chinese simplified) <a href="/examples/datetime-chinese-simplified" class="no-underline">↗️</a> </h2> <div class="d-flex flex-items-start"> <div class="col-4"> <sfgov-form id="form-datetime-chinese-simplified" style="width: 100%;" data-form="{&quot;components&quot;:[{&quot;type&quot;:&quot;datetime&quot;,&quot;label&quot;:&quot;This is the label&quot;,&quot;description&quot;:&quot;This is the description&quot;}]}" data-options="{&quot;language&quot;:&quot;zh&quot;}"> </sfgov-form> </div> <div class="pl-2"> <label class="fg-light-slate" for="json-datetime-chinese-simplified"> Submission data: </label> <sfgov-form-data data-form-id="form-datetime-chinese-simplified"> <textarea id="json-datetime-chinese-simplified" class="border-grey-4" rows="3" style="width: 100%; resize: vertical;"> </textarea> </sfgov-form-data> </div> </div> </section> <section id="datetime-chinese" class="example"> <h2 class="h3"> <a href="#datetime-chinese" class="fg-light-slate no-underline">#</a> Date & time (Chinese traditional) <a href="/examples/datetime-chinese" class="no-underline">↗️</a> </h2> <div class="d-flex flex-items-start"> <div class="col-4"> <sfgov-form id="form-datetime-chinese" style="width: 100%;" data-form="{&quot;components&quot;:[{&quot;type&quot;:&quot;datetime&quot;,&quot;label&quot;:&quot;This is the label&quot;,&quot;description&quot;:&quot;This is the description&quot;}]}" data-options="{&quot;language&quot;:&quot;zh-tw&quot;}"> </sfgov-form> </div> <div class="pl-2"> <label class="fg-light-slate" for="json-datetime-chinese"> Submission data: </label> <sfgov-form-data data-form-id="form-datetime-chinese"> <textarea id="json-datetime-chinese" class="border-grey-4" rows="3" style="width: 100%; resize: vertical;"> </textarea> </sfgov-form-data> </div> </div> </section> <section id="datetime-spanish" class="example"> <h2 class="h3"> <a href="#datetime-spanish" class="fg-light-slate no-underline">#</a> Date & time (Spanish) <a href="/examples/datetime-spanish" class="no-underline">↗️</a> </h2> <div class="d-flex flex-items-start"> <div class="col-4"> <sfgov-form id="form-datetime-spanish" style="width: 100%;" data-form="{&quot;components&quot;:[{&quot;type&quot;:&quot;datetime&quot;,&quot;label&quot;:&quot;This is the label&quot;,&quot;description&quot;:&quot;This is the description&quot;}]}" data-options="{&quot;language&quot;:&quot;es&quot;}"> </sfgov-form> </div> <div class="pl-2"> <label class="fg-light-slate" for="json-datetime-spanish"> Submission data: </label> <sfgov-form-data data-form-id="form-datetime-spanish"> <textarea id="json-datetime-spanish" class="border-grey-4" rows="3" style="width: 100%; resize: vertical;"> </textarea> </sfgov-form-data> </div> </div> </section> <section id="day-default" class="example"> <h2 class="h3"> <a href="#day-default" class="fg-light-slate no-underline">#</a> Day (default) <a href="/examples/day-default" class="no-underline">↗️</a> </h2> <div class="d-flex flex-items-start"> <div class="col-4"> <sfgov-form id="form-day-default" style="width: 100%;" data-form="{&quot;components&quot;:[{&quot;type&quot;:&quot;day&quot;,&quot;label&quot;:&quot;This is the label&quot;,&quot;description&quot;:&quot;This is the description&quot;}]}" data-options=""> </sfgov-form> </div> <div class="pl-2"> <label class="fg-light-slate" for="json-day-default"> Submission data: </label> <sfgov-form-data data-form-id="form-day-default"> <textarea id="json-day-default" class="border-grey-4" rows="3" style="width: 100%; resize: vertical;"> </textarea> </sfgov-form-data> </div> </div> </section> <section id="error-messages" class="example"> <h2 class="h3"> <a href="#error-messages" class="fg-light-slate no-underline">#</a> Error messages <a href="/examples/error-messages" class="no-underline">↗️</a> </h2> <div class="d-flex flex-items-start"> <div class="col-4"> <sfgov-form id="form-error-messages" style="width: 100%;" data-form="{&quot;components&quot;:[{&quot;type&quot;:&quot;fieldset&quot;,&quot;legend&quot;:&quot;Textfield&quot;,&quot;components&quot;:[{&quot;type&quot;:&quot;textfield&quot;,&quot;key&quot;:&quot;textfieldMaxLength&quot;,&quot;label&quot;:&quot;Max length&quot;,&quot;defaultValue&quot;:&quot;this is too long&quot;,&quot;validate&quot;:{&quot;maxLength&quot;:10}},{&quot;type&quot;:&quot;textfield&quot;,&quot;key&quot;:&quot;textfieldMaxLengthCustom&quot;,&quot;label&quot;:&quot;Max length + custom message&quot;,&quot;defaultValue&quot;:&quot;this is too long&quot;,&quot;validate&quot;:{&quot;maxLength&quot;:10,&quot;customMessage&quot;:&quot;Custom error message&quot;}},{&quot;type&quot;:&quot;textfield&quot;,&quot;key&quot;:&quot;textfieldMaxLengthRequired&quot;,&quot;label&quot;:&quot;Max length (required)&quot;,&quot;defaultValue&quot;:&quot;this is too long&quot;,&quot;validate&quot;:{&quot;required&quot;:true,&quot;maxLength&quot;:10}},{&quot;type&quot;:&quot;textfield&quot;,&quot;key&quot;:&quot;textfieldMaxLengthRequiredCustom&quot;,&quot;label&quot;:&quot;Max length (required) custom message&quot;,&quot;defaultValue&quot;:&quot;this is too long&quot;,&quot;validate&quot;:{&quot;required&quot;:true,&quot;maxLength&quot;:10,&quot;customMessage&quot;:&quot;Custom error message&quot;}}]},{&quot;type&quot;:&quot;fieldset&quot;,&quot;legend&quot;:&quot;Email&quot;,&quot;components&quot;:[{&quot;type&quot;:&quot;email&quot;,&quot;key&quot;:&quot;emailInvalid&quot;,&quot;label&quot;:&quot;Email (invalid)&quot;,&quot;defaultValue&quot;:&quot;not an email&quot;},{&quot;type&quot;:&quot;email&quot;,&quot;key&quot;:&quot;emailRequiredInvalid&quot;,&quot;label&quot;:&quot;Email (invalid + required)&quot;,&quot;defaultValue&quot;:&quot;not an email&quot;,&quot;validate&quot;:{&quot;required&quot;:true}},{&quot;type&quot;:&quot;email&quot;,&quot;key&quot;:&quot;emailRequiredInvalidEmpty&quot;,&quot;label&quot;:&quot;Email (invalid + required, empty)&quot;,&quot;validate&quot;:{&quot;required&quot;:true}}]},{&quot;type&quot;:&quot;fieldset&quot;,&quot;legend&quot;:&quot;Radio&quot;,&quot;components&quot;:[{&quot;type&quot;:&quot;radio&quot;,&quot;key&quot;:&quot;radioRequired&quot;,&quot;label&quot;:&quot;Radio (required)&quot;,&quot;values&quot;:[{&quot;label&quot;:&quot;One option&quot;,&quot;value&quot;:1},{&quot;label&quot;:&quot;Another option&quot;,&quot;value&quot;:2}],&quot;validate&quot;:{&quot;required&quot;:true}},{&quot;type&quot;:&quot;radio&quot;,&quot;key&quot;:&quot;radioRequiredCustom&quot;,&quot;label&quot;:&quot;Radio (required, custom message)&quot;,&quot;values&quot;:[{&quot;label&quot;:&quot;One option&quot;,&quot;value&quot;:1},{&quot;label&quot;:&quot;Another option&quot;,&quot;value&quot;:2}],&quot;validate&quot;:{&quot;required&quot;:true,&quot;customMessage&quot;:&quot;Please choose an option.&quot;}}]},{&quot;type&quot;:&quot;fieldset&quot;,&quot;legend&quot;:&quot;Checkboxes (select boxes)&quot;,&quot;components&quot;:[{&quot;type&quot;:&quot;selectboxes&quot;,&quot;key&quot;:&quot;selectboxesRequired&quot;,&quot;label&quot;:&quot;Select boxes (required)&quot;,&quot;values&quot;:[{&quot;label&quot;:&quot;One option&quot;,&quot;value&quot;:1},{&quot;label&quot;:&quot;Another option&quot;,&quot;value&quot;:2}],&quot;validate&quot;:{&quot;required&quot;:true}},{&quot;type&quot;:&quot;selectboxes&quot;,&quot;key&quot;:&quot;selectboxesRequiredCustom&quot;,&quot;label&quot;:&quot;Select boxes (required, custom message)&quot;,&quot;values&quot;:[{&quot;label&quot;:&quot;One option&quot;,&quot;value&quot;:1},{&quot;label&quot;:&quot;Another option&quot;,&quot;value&quot;:2}],&quot;validate&quot;:{&quot;required&quot;:true,&quot;customMessage&quot;:&quot;Please choose an option.&quot;}}]}]}" data-options="{&quot;example&quot;:{&quot;submit&quot;:true}}"> </sfgov-form> </div> <div class="pl-2"> <label class="fg-light-slate" for="json-error-messages"> Submission data: </label> <sfgov-form-data data-form-id="form-error-messages"> <textarea id="json-error-messages" class="border-grey-4" rows="3" style="width: 100%; resize: vertical;"> </textarea> </sfgov-form-data> </div> </div> </section> <section id="fieldset" class="example"> <h2 class="h3"> <a href="#fieldset" class="fg-light-slate no-underline">#</a> Fieldset <a href="/examples/fieldset" class="no-underline">↗️</a> </h2> <div class="d-flex flex-items-start"> <div class="col-4"> <sfgov-form id="form-fieldset" style="width: 100%;" data-form="{&quot;components&quot;:[{&quot;type&quot;:&quot;fieldset&quot;,&quot;legend&quot;:&quot;The fieldset legend&quot;,&quot;description&quot;:&quot;This fieldset description&quot;,&quot;components&quot;:[{&quot;type&quot;:&quot;textfield&quot;,&quot;label&quot;:&quot;A text field&quot;,&quot;key&quot;:&quot;some-text-field&quot;},{&quot;type&quot;:&quot;number&quot;,&quot;label&quot;:&quot;A number field&quot;,&quot;key&quot;:&quot;numero&quot;},{&quot;type&quot;:&quot;textarea&quot;,&quot;label&quot;:&quot;A text area field&quot;,&quot;key&quot;:&quot;textarea&quot;,&quot;value&quot;:&quot;&quot;},{&quot;type&quot;:&quot;checkbox&quot;,&quot;label&quot;:&quot;A checkbox&quot;,&quot;description&quot;:&quot;The checkbox description&quot;},{&quot;type&quot;:&quot;select&quot;,&quot;label&quot;:&quot;Select field&quot;,&quot;data&quot;:{&quot;values&quot;:[{&quot;label&quot;:&quot;Option 1&quot;,&quot;value&quot;:1},{&quot;label&quot;:&quot;Option 2&quot;,&quot;value&quot;:2}]}}]}]}" data-options=""> </sfgov-form> </div> <div class="pl-2"> <label class="fg-light-slate" for="json-fieldset"> Submission data: </label> <sfgov-form-data data-form-id="form-fieldset"> <textarea id="json-fieldset" class="border-grey-4" rows="3" style="width: 100%; resize: vertical;"> </textarea> </sfgov-form-data> </div> </div> </section> <section id="fieldset-well" class="example"> <h2 class="h3"> <a href="#fieldset-well" class="fg-light-slate no-underline">#</a> Fieldset in a well <a href="/examples/fieldset-well" class="no-underline">↗️</a> </h2> <div class="d-flex flex-items-start"> <div class="col-4"> <sfgov-form id="form-fieldset-well" style="width: 100%;" data-form="{&quot;components&quot;:[{&quot;type&quot;:&quot;well&quot;,&quot;components&quot;:[{&quot;type&quot;:&quot;fieldset&quot;,&quot;legend&quot;:&quot;This is the fieldset legend&quot;,&quot;description&quot;:&quot;This is the fieldset description&quot;,&quot;components&quot;:[{&quot;type&quot;:&quot;textfield&quot;,&quot;key&quot;:&quot;name&quot;,&quot;label&quot;:&quot;Your name&quot;},{&quot;type&quot;:&quot;number&quot;,&quot;key&quot;:&quot;age&quot;,&quot;label&quot;:&quot;Your age&quot;}]}]}]}" data-options=""> </sfgov-form> </div> <div class="pl-2"> <label class="fg-light-slate" for="json-fieldset-well"> Submission data: </label> <sfgov-form-data data-form-id="form-fieldset-well"> <textarea id="json-fieldset-well" class="border-grey-4" rows="3" style="width: 100%; resize: vertical;"> </textarea> </sfgov-form-data> </div> </div> </section> <section id="fieldset-in-well" class="example"> <h2 class="h3"> <a href="#fieldset-in-well" class="fg-light-slate no-underline">#</a> Fieldset in a well <a href="/examples/fieldset-in-well" class="no-underline">↗️</a> </h2> <div class="d-flex flex-items-start"> <div class="col-4"> <sfgov-form id="form-fieldset-in-well" style="width: 100%;" data-form="{&quot;components&quot;:[{&quot;type&quot;:&quot;well&quot;,&quot;label&quot;:&quot;The well label&quot;,&quot;components&quot;:[{&quot;type&quot;:&quot;fieldset&quot;,&quot;legend&quot;:&quot;The fieldset legend&quot;,&quot;description&quot;:&quot;The fieldset description&quot;,&quot;components&quot;:[{&quot;type&quot;:&quot;textfield&quot;,&quot;label&quot;:&quot;A text field&quot;,&quot;key&quot;:&quot;some-text-field&quot;},{&quot;type&quot;:&quot;number&quot;,&quot;label&quot;:&quot;A number field&quot;,&quot;key&quot;:&quot;numero&quot;},{&quot;type&quot;:&quot;textarea&quot;,&quot;label&quot;:&quot;A text area field&quot;,&quot;key&quot;:&quot;textarea&quot;,&quot;value&quot;:&quot;&quot;},{&quot;type&quot;:&quot;checkbox&quot;,&quot;label&quot;:&quot;A checkbox&quot;,&quot;description&quot;:&quot;The checkbox description&quot;},{&quot;type&quot;:&quot;select&quot;,&quot;label&quot;:&quot;Select field&quot;,&quot;data&quot;:{&quot;values&quot;:[{&quot;label&quot;:&quot;Option 1&quot;,&quot;value&quot;:1},{&quot;label&quot;:&quot;Option 2&quot;,&quot;value&quot;:2}]}}]}]}]}" data-options=""> </sfgov-form> </div> <div class="pl-2"> <label class="fg-light-slate" for="json-fieldset-in-well"> Submission data: </label> <sfgov-form-data data-form-id="form-fieldset-in-well"> <textarea id="json-fieldset-in-well" class="border-grey-4" rows="3" style="width: 100%; resize: vertical;"> </textarea> </sfgov-form-data> </div> </div> </section> <section id="kitchen-sink" class="example"> <h2 class="h3"> <a href="#kitchen-sink" class="fg-light-slate no-underline">#</a> Kitchen sink <a href="/examples/kitchen-sink" class="no-underline">↗️</a> </h2> <div class="d-flex flex-items-start"> <div class="col-4"> <sfgov-form id="form-kitchen-sink" style="width: 100%;" data-form="{&quot;components&quot;:[{&quot;type&quot;:&quot;textfield&quot;,&quot;label&quot;:&quot;A text field&quot;,&quot;description&quot;:&quot;The description&quot;},{&quot;type&quot;:&quot;number&quot;,&quot;label&quot;:&quot;A number field&quot;,&quot;description&quot;:&quot;The description&quot;},{&quot;type&quot;:&quot;textarea&quot;,&quot;label&quot;:&quot;A text area field&quot;,&quot;description&quot;:&quot;The description&quot;},{&quot;type&quot;:&quot;checkbox&quot;,&quot;label&quot;:&quot;A checkbox&quot;,&quot;description&quot;:&quot;The description&quot;},{&quot;type&quot;:&quot;select&quot;,&quot;label&quot;:&quot;Select field&quot;,&quot;description&quot;:&quot;The description&quot;,&quot;data&quot;:{&quot;values&quot;:[{&quot;label&quot;:&quot;Option 1&quot;,&quot;value&quot;:1},{&quot;label&quot;:&quot;Option 2&quot;,&quot;value&quot;:2}]}},{&quot;type&quot;:&quot;selectboxes&quot;,&quot;label&quot;:&quot;Select boxes&quot;,&quot;description&quot;:&quot;The description&quot;,&quot;values&quot;:[{&quot;label&quot;:&quot;Select box 1&quot;,&quot;value&quot;:1},{&quot;label&quot;:&quot;Select box 2&quot;,&quot;value&quot;:2},{&quot;label&quot;:&quot;Select box 3&quot;,&quot;value&quot;:3}]},{&quot;type&quot;:&quot;radio&quot;,&quot;description&quot;:&quot;The description&quot;,&quot;values&quot;:[{&quot;label&quot;:&quot;Radio 1&quot;,&quot;value&quot;:1},{&quot;label&quot;:&quot;Radio 2&quot;,&quot;value&quot;:2},{&quot;label&quot;:&quot;Radio 3&quot;,&quot;value&quot;:3}]},{&quot;type&quot;:&quot;button&quot;,&quot;label&quot;:&quot;This is a button&quot;,&quot;description&quot;:&quot;The description&quot;},{&quot;type&quot;:&quot;email&quot;,&quot;label&quot;:&quot;Email field&quot;,&quot;description&quot;:&quot;The description&quot;},{&quot;type&quot;:&quot;phoneNumber&quot;,&quot;label&quot;:&quot;Phone number field&quot;,&quot;description&quot;:&quot;The description&quot;},{&quot;type&quot;:&quot;address&quot;,&quot;label&quot;:&quot;Address field&quot;,&quot;description&quot;:&quot;The description&quot;},{&quot;type&quot;:&quot;datetime&quot;,&quot;label&quot;:&quot;Datetime field&quot;,&quot;description&quot;:&quot;The description&quot;},{&quot;type&quot;:&quot;currency&quot;,&quot;label&quot;:&quot;Currency field&quot;,&quot;description&quot;:&quot;The description&quot;},{&quot;type&quot;:&quot;file&quot;,&quot;label&quot;:&quot;File field&quot;,&quot;description&quot;:&quot;The description&quot;,&quot;storage&quot;:&quot;base64&quot;}]}" data-options=""> </sfgov-form> </div> <div class="pl-2"> <label class="fg-light-slate" for="json-kitchen-sink"> Submission data: </label> <sfgov-form-data data-form-id="form-kitchen-sink"> <textarea id="json-kitchen-sink" class="border-grey-4" rows="3" style="width: 100%; resize: vertical;"> </textarea> </sfgov-form-data> </div> </div> </section> <section id="multi-file" class="example"> <h2 class="h3"> <a href="#multi-file" class="fg-light-slate no-underline">#</a> Multiple file upload <a href="/examples/multi-file" class="no-underline">↗️</a> </h2> <div class="d-flex flex-items-start"> <div class="col-4"> <sfgov-form id="form-multi-file" style="width: 100%;" data-form="{&quot;components&quot;:[{&quot;type&quot;:&quot;file&quot;,&quot;storage&quot;:&quot;base64&quot;,&quot;label&quot;:&quot;This is the label&quot;,&quot;description&quot;:&quot;This is the description&quot;,&quot;multiple&quot;:true}]}" data-options=""> </sfgov-form> </div> <div class="pl-2"> <label class="fg-light-slate" for="json-multi-file"> Submission data: </label> <sfgov-form-data data-form-id="form-multi-file"> <textarea id="json-multi-file" class="border-grey-4" rows="3" style="width: 100%; resize: vertical;"> </textarea> </sfgov-form-data> </div> </div> </section> <section id="radio" class="example"> <h2 class="h3"> <a href="#radio" class="fg-light-slate no-underline">#</a> Radio <a href="/examples/radio" class="no-underline">↗️</a> </h2> <div class="d-flex flex-items-start"> <div class="col-4"> <sfgov-form id="form-radio" style="width: 100%;" data-form="{&quot;components&quot;:[{&quot;type&quot;:&quot;radio&quot;,&quot;label&quot;:&quot;This is the label&quot;,&quot;description&quot;:&quot;And this is the description&quot;,&quot;tooltip&quot;:&quot;And this is the tooltip&quot;,&quot;values&quot;:[{&quot;label&quot;:&quot;Option 1&quot;,&quot;value&quot;:1},{&quot;label&quot;:&quot;Option 2 (blah)&quot;,&quot;value&quot;:2},{&quot;label&quot;:&quot;Option 3 (this is some really long text that should wrap nicely, thanks so much)&quot;,&quot;value&quot;:3}]}]}" data-options=""> </sfgov-form> </div> <div class="pl-2"> <label class="fg-light-slate" for="json-radio"> Submission data: </label> <sfgov-form-dat