MentorAgent Docs
Menu

ReferencePackage: Novior.MentorAgent.Abstractions

MentorFormOptions class

The MentorFormOptions class of Novior.MentorAgent.Abstractions.Interfaces: How MentorFormExtensions.RegisterForm reads a form. A field is named by its…

View as Markdown
On this page

How MentorFormExtensions.RegisterForm reads a form. A field is named by its property, as written in the model (nameof(Order.CustomerName)) or as the model sees it (customerName); a name that is no field of the form throws when the form is registered.

Namespace: Novior.MentorAgent.Abstractions.Interfaces. Package: Novior.MentorAgent.Abstractions.

public sealed class MentorFormOptions

Terminal
dotnet add package Novior.MentorAgent.Abstractions

public MentorFormOptions()

public MentorFormOptions Exclude(params string[] fields)

Leaves these fields out: the model is not told of them and cannot fill them.

public MentorFormOptions IncludeSensitive(params string[] fields)

Lets in these sensitive fields, which a form leaves out unless they are named here: the model can then fill them, and the page's field is written even when it is a password field. What the model writes there it has seen, and so has its provider: name only what the user may say to the assistant.

public MentorFormOptions Selector(string field, string selector)

The CSS selector of a field in the page, in place of its data-mentor-id.