syncfusion-blazor-dataform — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited syncfusion-blazor-dataform (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
A comprehensive skill for implementing the Syncfusion Blazor DataForm component. This skill covers installation, configuration, data binding, validation, event handling, templating, and customization of forms in Blazor applications.
The Syncfusion Blazor DataForm (SfDataForm) is a powerful form component that streamlines the creation of dynamic, data-driven forms with automatic validation, field binding, and event handling. It supports:
📄 Read: references/getting-started.md
Start here for installation, NuGet package setup, namespace imports, service registration, theme configuration, and a basic DataForm example.
📄 Read: references/form-items.md
Learn how to define form items, configure labels, placeholders, hints, editor types, and customize individual field behavior.
📄 Read: references/autogeneration.md
Discover how to automatically generate form fields from model properties using FormAutoGenerateItems, including type mapping and combining auto-generated with custom fields.
📄 Read: references/data-binding.md
Understand model binding, EditContext binding, two-way data binding, and binding to complex data structures.
📄 Read: references/validation.md
Master form validation with data annotations, custom validation rules, Fluent Validation integration, and error message display.
📄 Read: references/events.md
Learn about form submission events and field-level events for handling user interactions and form state changes.
📄 Read: references/layout-customization.md
Customize form layout with columns, column spans, label positioning, floating labels, and custom button placement.
📄 Read: references/templates.md
Create custom form layouts and field renderings using FormTemplate and FormItemTemplate with render fragments.
📄 Read: references/localization.md
Set up localization for validation messages, form labels, and error messages in multiple languages.
Here's a minimal working example to get started:
@page "/dataform-example"
@using System.ComponentModel.DataAnnotations
@using Syncfusion.Blazor.DataForm
<SfDataForm ID="MyDataForm"
Model="@employeeModel">
<FormValidator>
<DataAnnotationsValidator></DataAnnotationsValidator>
</FormValidator>
<FormItems>
<FormAutoGenerateItems></FormAutoGenerateItems>
</FormItems>
</SfDataForm>
@code {
public class EmployeeModel
{
[Required(ErrorMessage = "First Name is required")]
[Display(Name = "First Name")]
public string FirstName { get; set; }
[Required(ErrorMessage = "Email is required")]
[EmailAddress(ErrorMessage = "Invalid email address")]
[Display(Name = "Email")]
public string Email { get; set; }
[Range(18, 65, ErrorMessage = "Age must be between 18 and 65")]
[Display(Name = "Age")]
public int Age { get; set; }
[Display(Name = "Date of Birth")]
public DateTime? DateOfBirth { get; set; }
}
private EmployeeModel employeeModel = new EmployeeModel();
}<SfDataForm ID="ContactForm" Model="@contact" OnValidSubmit="HandleValidSubmit">
<FormValidator>
<DataAnnotationsValidator></DataAnnotationsValidator>
</FormValidator>
<FormItems>
<FormItem Field="@nameof(contact.Name)" LabelText="Full Name"></FormItem>
<FormItem Field="@nameof(contact.Email)" LabelText="Email Address"></FormItem>
<FormItem Field="@nameof(contact.Message)" EditorType="FormEditorType.TextArea"></FormItem>
</FormItems>
</SfDataForm>
@code {
private Contact contact = new();
private async Task HandleValidSubmit(EditContext context)
{
// Save contact to database
await SaveContactAsync(contact);
}
}<SfDataForm Model="@product">
<FormItems>
<FormItem Field="@nameof(product.Name)" LabelText="Product Name"></FormItem>
<FormAutoGenerateItems></FormAutoGenerateItems>
<FormItem Field="@nameof(product.Category)" EditorType="FormEditorType.DropDownList"></FormItem>
</FormItems>
</SfDataForm>
@code {
private Product product = new();
}<SfDataForm Model="@order" OnUpdate="HandleFieldUpdate">
<FormItems>
<FormItem Field="@nameof(order.Country)" LabelText="Country"></FormItem>
<FormItem Field="@nameof(order.City)" LabelText="City"></FormItem>
<FormAutoGenerateItems></FormAutoGenerateItems>
</FormItems>
</SfDataForm>
@code {
private Order order = new();
private async Task HandleFieldUpdate(FormUpdateEventArgs args)
{
if (args.FieldName == nameof(Order.Country))
{
// Update cities based on selected country
order.City = await GetCitiesForCountryAsync(order.Country);
}
}
}<SfDataForm Model="@employee" ColumnCount="2">
<FormItems>
<FormItem Field="@nameof(employee.FirstName)" LabelText="First Name" ColumnSpan="1"></FormItem>
<FormItem Field="@nameof(employee.LastName)" LabelText="Last Name" ColumnSpan="1"></FormItem>
<FormItem Field="@nameof(employee.Email)" LabelText="Email" ColumnSpan="2"></FormItem>
<FormItem Field="@nameof(employee.Department)" LabelText="Department" ColumnSpan="1"></FormItem>
<FormItem Field="@nameof(employee.Salary)" LabelText="Salary" ColumnSpan="1"></FormItem>
</FormItems>
</SfDataForm>
@code {
private Employee employee = new();
}| Property | Type | Purpose |
|---|---|---|
Model | object | The data model bound to the form |
EditContext | EditContext | Blazor EditContext for advanced binding scenarios |
ColumnCount | int | Number of columns for form layout |
OnValidSubmit | EventCallback | Fires when form is submitted with valid data |
OnInvalidSubmit | EventCallback | Fires when form is submitted with invalid data |
OnSubmit | EventCallback | Fires on every submit attempt |
OnUpdate | EventCallback | Fires when a field value changes |
Important: In most cases, you don't need to specify EditorType as the DataForm automatically selects the appropriate editor based on your model property type. Use these values only when you need to override the default behavior.
| FormEditorType | Use Case | When to Use |
|---|---|---|
TextBox | Single-line text input | Override for string fields (default), not needed for numeric types |
TextArea | Multi-line text input | When you need multi-line text entry for string properties |
DatePicker | Date selection only | Override for DateTime (default for DateTime) |
DateTimePicker | Date and time selection | When you need both date and time for DateTime properties |
TimePicker | Time selection only | When you need only time selection for TimeSpan or DateTime |
DropDownList | Dropdown selection from list | For enum or custom list selection |
ComboBox | Editable dropdown with filtering | When you need searchable dropdown |
AutoComplete | Auto-complete with suggestions | When you need auto-suggest functionality |
Checkbox | Boolean toggle (note: lowercase 'b') | Override for bool (default), NOT CheckBox |
Switch | Toggle switch for boolean | Alternative to checkbox for bool properties |
Password | Password input with masking | For password string fields |
Critical Notes:
int, long, decimal, double, float → Numeric textbox (no EditorType needed)string → Textbox (no EditorType needed)bool → Checkbox (no EditorType needed)DateTime → DatePicker (no EditorType needed)enum → DropDownList (no EditorType needed)Checkbox (lowercase 'b'), NOT CheckBox (capital B)NumericTextBox editor type - numeric behavior is automatic based on property typeEditorType when you want to override the default behavior| Method | Purpose |
|---|---|
Refresh() | Refresh form and re-render fields |
Submit() | Programmatically submit the form |
Reset() | Clear form and reset to initial values |
IsValid() | Check if form is valid |
Validate() | Trigger validation without submitting |
When configuring FormItem elements with EditorType, keep these critical points in mind:
EditorType unless you want to override the default behavior.EditorType when you want to override the default:FormEditorType.TextArea for multi-line string inputFormEditorType.Switch instead of checkbox for booleanFormEditorType.DateTimePicker instead of DatePicker for DateTime with timeFormEditorType.Password for password stringsFormEditorType.DropDownList or ComboBox for custom listsFormEditorType.Checkbox with lowercase 'b', not FormEditorType.CheckBox.FormEditorType.NumericTextBox. Numeric behavior is automatic based on property type.Example:
<!-- Numeric field - EditorType not needed, automatically renders numeric textbox -->
<FormItem Field="@nameof(model.Quantity)"
LabelText="Quantity">
</FormItem>
<!-- Boolean field - EditorType not needed, automatically renders checkbox -->
<FormItem Field="@nameof(model.IsActive)"
LabelText="Is Active">
</FormItem>
<!-- String field with TextArea override -->
<FormItem Field="@nameof(model.Description)"
LabelText="Description"
EditorType="FormEditorType.TextArea">
</FormItem>
<!-- Boolean field with Switch override -->
<FormItem Field="@nameof(model.IsEnabled)"
LabelText="Enabled"
EditorType="FormEditorType.Switch">
</FormItem>~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.