> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.itential.com/itential-platform/2023-2/studio/form-builder/nso-service-model-form-fields/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.itential.com/_mcp/server. # NSO Service Model form field reference > How to create and configure Form Builder forms using NSO YANG service models, including constraint validation, field properties, and deleting fields. ## Guidelines * To view device elements from a service model in Form Builder, specify where to find the YANG files. In NSO adapter version 4 and higher, configure the `yangdirs` property in the adapter. * In older NSO adapter versions (pre-version 4), include your YANG schemas in the `load-path` of `ncs.conf`. * For more information, see the NSO NETCONF adapter documentation. ## Create a form using an NSO YANG service model #### Select a service Select the appropriate service from the **Data Elements** dropdown list. The leafs defined in the model display automatically below the dropdown. #### Assign fields Drag and drop the fields onto the form. By default, each field label matches the leaf name from the service model. Click a field and type a new label to change it. #### Assign lists Assign the **Lists** defined in NSO to the form. #### Group fields in containers Click **Add Container** to group fields together. Toggle the direction icon (double arrow in the left corner) to arrange containers horizontally or vertically. Containers can be nested within other containers. #### Name and save Assign a name to the form and click **Save**. ![](/_fern-img/3a34a07680e9a966634e740c64a002105a4eeb58fc67605816d87da1fb6f0fd0.webp) ### Meta Data fields In addition to leafs from an NSO YANG service model, you can assign Meta Data Fields to a form. The following field types are available: * **Text Box** — Allows any characters. * **Number Field** — Accepts only numerical values. * **Checkbox** — A boolean field that can be checked or unchecked. * **Dropdown** — Accepts one selected option from a dropdown list. ![](/_fern-img/60177567b85ca567be8359ffee26049b34d263f7e1deff52176dfdf95898d409.webp) ## Preview a form Once a form is saved, click the **Form Preview** button (eye icon) in the title bar to preview the form. ![](file:docs/assets/images/platform/studio/05-previewForm\(1\).png) All form fields are editable in Preview mode, including those configured as a leaf reference or enumeration in the YANG service model, just as they are when the form is used in a workflow. ![](/_fern-img/04796ca589bbc82b994f25c0daa9f3cff468d0b762a9fc33a1b30f0a3163afd5.webp) ## Enable or disable constraints The **Validate Constraints** checkbox allows you to bypass the `must` statement validations defined in the YANG service models. The checkbox works at the form level — disabling it disables validations for the entire form. It does not disable other form validations. ### Examples The example below shows a form with a leaf `description` that has a length constraint (3 to 8 characters) and a `must` statement (`leafWithMust`) that requires `description` to be exactly 5 characters. ![](/_fern-img/defff8ac69c8fedc866d8b10ae41b9267ca7a382f91ab651cedd555f93dff996.webp) When `description` has only two characters, an error message displays for the leaf: ![](/_fern-img/389135aa9e01c20529ea42a5aff2e636b3670bd80873f5be6fe8acf4d5363837.webp) Disabling **Validate Constraints** does not remove the length error for the field: ![](/_fern-img/bd91f24d49521041072b6e54c0ab62c2b553a34db67a37dd73d1ccfa4699d510.webp) When `description` has three characters, the length validation passes — but `leafWithMust` now fails because it requires exactly 5 characters: ![](/_fern-img/7df9abd5cd15056b9d9789ff17fa86b1afca58dcb7acc3a544d0c129c419d5a3.webp) When **Validate Constraints** is unchecked, the `must` statement validation is disabled and the form reports no errors: ![](/_fern-img/fedfae32ba0fec2b056e27abdb0f88d2777b4a91ce25361b4a176e3ff7ba3288.webp) ## Mandatory vs. required field constraint validation Some fields are **mandatory** — they must contain a value and this cannot be overridden. Mandatory fields always display a red asterisk (\*) or the text "Required" next to the field label. **Constraints** can also restrict values based on the value of another field. If expected data is missing or incorrectly formatted, an error message displays. ### Examples Mandatory constraint validation: ![](/_fern-img/a9e4419eba8f8124ee083af0ec27a99b910633ca7cb3223dfa08e9ab0f3728fc.webp) For **required** field constraint validation, there is a dependency between the `key` and the `required` field element. When a nested table `key` is not entered, the form skips the table row: ![](/_fern-img/16061196e0bf8edfd4597d8617ce1d92e848e22f20d88091df649210417a6fd0.webp) When the table `key` is missing, the form submits but the table row is ignored regardless of whether Field A or Field B was filled in: ![](/_fern-img/195503289f156b1cfb493128f230d26171984000e6d549fed87d59e831b4c0db.webp) **Output (missing key):** ```json { "name": [ "test" ] } ``` When the table key is present but required fields are empty, the form cannot be submitted: ![](/_fern-img/4eef10d4395bec5f6450ddae5980fce5de5645568ab279ffb7bd6fa3c6186913.webp) A successful submission includes a valid table key and all required fields: ![](/_fern-img/3d688aaf725f741faa94dd12e7bc0871d3257337f703b797cee6cfb79a477532.webp) **Output (successful):** ```json { "name": [ "testValCrit" ], "table": [ [ { "key": "1", "fieldA": "A", "fieldB": "B" } ] ] } ``` ### Resources * [YANG Data Modeling — Keys in Lists (RFC 7950)](https://datatracker.ietf.org/doc/html/rfc7950#page-85) * [MDN Constraint Validation](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Constraint_validation) ## Edit form field properties #### Open the Configure dialog Hover over the field and click the **Configure Properties** icon in the top-right corner of the field. The **Configure** dialog opens. ![](/_fern-img/0f046f8aaaa9ea20b1b2adebe5d252a26458539d134bfd058ead58db88c38ef3.webp)![](/_fern-img/efdfc63816b23e80bc083154c3b9a1081e880d53ffe2a3670852619193abfa6f.webp) | Property | Description | | -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Custom Label | Adds a custom label above the field. | | Field Key | An internal value that identifies the field in the workflow engine. Update this only for a Meta Data Field — do not modify it when the field is part of an NSO YANG service model. | | Info / Tool Tip | Adds a custom tooltip that displays when the cursor is placed over the field. | | Required | When checked, the form cannot be submitted unless a value has been entered in the field. | | Read-Only | When checked, the field is visible but cannot be modified by users. | | Hide Field | When checked, the field is hidden from users but remains available to the workflow engine. | | Min Length | The minimum number of characters a Text field must contain before it can be submitted. | | Max Length | The maximum number of characters a Text field may contain before it can be submitted. | | Regex Patterns | Does not apply to fields assigned an NSO leaf reference or enumeration. | | Custom Error Message | Adds a custom error message when user input is invalid. Requires that Field Type be defined. | ## Delete a form field Click the trashcan icon on the field to remove it. ![](/_fern-img/23e5980d0d9a81c2de9b18df201ed00677250213cfe79b3997bb06d63ec4e0f5.webp) > How to create and configure Form Builder forms using NSO YANG service models, including constraint validation, field properties, and deleting fields.