Use this skill when a user needs to generate, troubleshoot, or extend a schema-driven ASP.NET Core form with the Syncfusion Form Renderer component. The form schema declares field definitions, layout, validation, dynamic behavior, and submission actions; Razor Pages provide the host and C# model.
When to use this skill
Use this skill when the user needs to:
- create an ASP.NET Core Razor Pages app and install the Form Renderer NuGet packages
- define a form with
properties,layout, andsettings - add required, pattern, minLength, maxLength, or custom validation rules
- show or hide fields based on previous answers
- build dependent dropdowns or cascaded option lists
- constrain numeric/date values from another field with
minMaxRange - calculate values with
expressionValueand external references - handle submit, reset, and custom button actions
- define grouped button actions with
allowMultipleandbuttonsGroups - replace built-in widgets with custom templates in ASP.NET Core Razor Pages
Quick start
- Create an ASP.NET Core Razor Pages app:
dotnet new webapp -o RazorPagesFormRenderer
cd RazorPagesFormRenderer
- Install the Form Renderer and theme NuGet packages:
dotnet add package Syncfusion.AspNetCore.FormRenderer
dotnet add package Syncfusion.AspNetCore.Themes
- Register the Form Renderer tag helpers in
Pages/_ViewImports.cshtml:
@addTagHelper *, Syncfusion.AspNetCore.FormRenderer
@addTagHelper *, Syncfusion.AspNetCore.Base
- Add the theme CSS, renderer script, and script manager in
Pages/Shared/_Layout.cshtml:
<head>
<link rel="stylesheet" href="_content/Syncfusion.AspNetCore.Themes/styles/fluent2.css" />
<script src="_content/Syncfusion.AspNetCore.FormRenderer/scripts/sf-formrenderer.min.js"></script>
</head>
<body>
<!-- Page content -->
<ejs-scripts></ejs-scripts>
</body>
- Render the schema from a Razor Page:
@page
@model FormRenderer.DefaultModel
@using Syncfusion.EJ2.FormRenderer
<ejs-form-renderer id="registrationForm" schema="@Model.FormSchema"></ejs-form-renderer>
Build Model.FormSchema in the page model using the C# schema/property classes. See the getting-started reference for the complete schema model and example.
- Run the app from Visual Studio, or use
Ctrl+F5to launch it without debugging.
Documentation and navigation guide
Getting started
Read references/getting-started.md
- ASP.NET Core Razor Pages project setup
- Form Renderer and theme NuGet packages
- tag-helper registration and static asset setup
- basic
schema+submitexample - render the form with the ASP.NET Core tag helper
Form schema and field model
Read references/form-schema.md
- root object structure:
version,properties,layout,settings - all supported field widgets, their data types, and the UI interactions they provide
- per-field presentation options and choosing widgets to match customer preferences
- layout examples for panels, tables, tabs, and cards, including how container children reference fields
- field IDs, names, labels, types, and common metadata
Validation
Read references/validations.md
- built-in rules like
required,minLength,maxLength, andpattern - custom validation with
customValidationandvalid = ... - when validation runs on submit versus change
Conditional behavior
visibleWhen,hideWhen,requiredWhen,readOnlyWhen,disabledWhen- rule schema, nested
and/orgroups, complete operator list, and each rule's effects - component-by-component support matrix showing which condition types are supported or ignored
setValueWhenandchoiceBasedFieldconfiguration concepts
Dynamic expressions
Read references/expressions.md
expressionValuefor derived values from other fields- field references, array indexes, grouping, ternary syntax, and arithmetic/comparison/logical operators
- constants including
PI,TRUE,FALSE,NULL, andMath - aggregate, math, string, and date functions, including
DATEFORMAT, with syntax and return types
Dependent dropdowns
Read references/dependent-dropdown.md
- cascading options with
choiceBasedField primaryFieldIdandchoiceMappingshowAllWhenNotMappedbehavior for missing values
Range logic based on other fields
Read references/min-max-range.md
minMaxRangewithfieldreference objects- numeric and date range constraints driven by another field
- apply fixed
min/maxrules vs cross-field range rules
Remote data binding
Read references/remote-data-binding-in-components.md
- remote option sources for dropdown, multiselect, and checkbox group fields
- URL adaptors, response
dataPath, request headers, and dynamic search/filter values - search, sort, filter, skip, and take query configuration
Data grid features
Read references/data-grid-features.md
- static and remote grid data sources
- column editing, validation, custom validation, and expressions
- conditional data sources driven by other form fields
- grid search, sort, filter, and paging configuration
Form actions and templates
Read references/form-actions.md and references/templates.md
buttonType: 'submit','reset', and'button', plus grouped button actionssubmit/buttonClickbehavior and custom logicsubmit,change,buttonClick,failure, andcreatedevents, including their arguments and lifecycle behaviorallowMultipleandbuttonsGroupsitem labels, actions, styles, icons, and disabled state- custom widget templates using ASP.NET Core custom-widget tag helpers
- all
CustomWidgetSettingModelproperties and HTML sanitizer behavior - native or custom-component templates with a focusable control, bound value, and
setFieldValuesynchronization - preserving the active input focus without forcing autofocus on render
- updating Form Renderer state from a custom field template
Common patterns
- Keep
namevalues stable because they are used as payload keys and references in expressions. - Use
layoutobjects to organize fields in panels, tables, tabs, or cards. - When a control depends on another field, prefer
choiceBasedFieldfor cascading dropdown lists andminMaxRangefor dynamic min/max limits. - Store validation and conditional logic next to the field they affect so the schema remains easy to reason about.
- Prefer
buttonType: 'submit'for final validation andbuttonType: 'button'when custom action logic is required.
Implementation checklist
When building or fixing a Form Renderer schema, confirm:
- every field has a unique
nameandid layoutreferences validpropertyIdvalues- supported widgets match the field types
- conditional fields use valid
fieldreferences and operators - dynamic expressions reference existing field names with
{name}syntax - custom validation assigns
valid = trueor a string error message - submit buttons are included when form submission is required
This skill is intended to help generate working ASP.NET Core Form Renderer forms from the docs in this repository without inventing unsupported schema properties.