layout: default title: FormTemplate parent: Core Classes —

dymaptic.GeoBlazor.Core

dymaptic.GeoBlazor.Core.Components.Widgets

FormTemplate Class

A FormTemplate formats and defines the content of a FeatureForm for a specific Layer or Graphic. A FormTemplate allows the user to access values from feature attributes when a feature in the view is selected.
The FormTemplate can be set directly on a FeatureLayer, a FeatureForm, or its view model. The template consists of various elements that display a specific type of form data.
ArcGIS Maps SDK for JavaScript

public class FormTemplate : dymaptic.GeoBlazor.Core.Components.MapComponent

Inheritance System.Object 🡒 Microsoft.AspNetCore.Components.ComponentBase 🡒 MapComponent 🡒 FormTemplate

Constructors

FormTemplate() Constructor

Parameterless constructor for use as a razor component

public FormTemplate();

FormTemplate(string, string, Nullable, List, List) Constructor

Creates a new FormTemplate in code with parameters

public FormTemplate(string? title=null, string? description=null, System.Nullable<bool> preserveFieldValuesWhenHidden=null, System.Collections.Generic.List<dymaptic.GeoBlazor.Core.Components.Widgets.FormElement>? elements=null, System.Collections.Generic.List<dymaptic.GeoBlazor.Core.Components.Popups.ExpressionInfo>? expressionInfos=null);

Parameters

title System.String

The string template for defining how to format the title displayed at the top of a form.

description System.String

The description of the form.

preserveFieldValuesWhenHidden System.Nullable<System.Boolean>

Indicates whether to retain or clear a form’s field element values. Use this property when a field element initially displays as visible but then updates to not display as a result of an applied visibilityExpression.

elements System.Collections.Generic.List<FormElement>

An array of form element objects that represent an ordered list of form elements.

expressionInfos System.Collections.Generic.List<ExpressionInfo>

An array of objects or ExpressionInfo[] that reference Arcade expressions following the specification defined by the Form Constraint Profile or the Form Calculation Profile. Form Constraint expressions must return either true or false. Form Calculation expressions must return a string, date, or a number.

Properties

FormTemplate.Description Property

The description of the form.

public string? Description { get; set; }

Property Value

System.String

FormTemplate.Elements Property

An array of form element objects that represent an ordered list of form elements.
Elements are designed to allow the form author the ability to define the layout for fields when collecting and/or editing data.

public System.Collections.Generic.List<dymaptic.GeoBlazor.Core.Components.Widgets.FormElement>? Elements { get; set; }

Property Value

System.Collections.Generic.List<FormElement>

Remarks

Nested group elements are not supported.

FormTemplate.ExpressionInfos Property

An array of objects or ExpressionInfo[] that reference Arcade expressions following the specification defined by the Form Constraint Profile or the Form Calculation Profile. Form Constraint expressions must return either true or false. Form Calculation expressions must return a string, date, or a number.

public System.Collections.Generic.List<dymaptic.GeoBlazor.Core.Components.Popups.ExpressionInfo>? ExpressionInfos { get; set; }

Property Value

System.Collections.Generic.List<ExpressionInfo>

FormTemplate.PreserveFieldValuesWhenHidden Property

Indicates whether to retain or clear a form’s field element values. Use this property when a field element initially displays as visible but then updates to not display as a result of an applied visibilityExpression.

public System.Nullable<bool> PreserveFieldValuesWhenHidden { get; set; }

Property Value

System.Nullable<System.Boolean>

FormTemplate.Title Property

The string template for defining how to format the title displayed at the top of a form.

public string? Title { get; set; }

Property Value

System.String

Methods

FormTemplate.RegisterChildComponent(MapComponent) Method

Called from dymaptic.GeoBlazor.Core.Components.MapComponent.OnInitializedAsync to “Register” the current component with it’s parent.

public override System.Threading.Tasks.Task RegisterChildComponent(dymaptic.GeoBlazor.Core.Components.MapComponent child);

Parameters

child MapComponent

The calling, child component to register

Returns

System.Threading.Tasks.Task

Exceptions

InvalidChildElementException
Throws if the current child is not a valid sub-component to the parent.

Remarks

This method is an implementation detail and should not be called directly by consumers. In future versions, this may be changed to an internal method. If you see no other way to register a child component, please open an issue on GitHub.

FormTemplate.UnregisterChildComponent(MapComponent) Method

Undoes the “Registration” of a child with its parent.

public override System.Threading.Tasks.Task UnregisterChildComponent(dymaptic.GeoBlazor.Core.Components.MapComponent child);

Parameters

child MapComponent

The child to unregister

Returns

System.Threading.Tasks.Task

Remarks

This method is an implementation detail and should not be called directly by consumers. In future versions, this may be changed to an internal method.