BaseCustomForm class
Provides a base implementation for custom forms that can be displayed in the Connector UI. This abstract class implements the ICustomForm interface and provides common functionality for managing input descriptors and form lifecycle operations. Derived classes should override the abstract methods to provide custom form behavior.
public abstract class BaseCustomForm : ICustomForm
Public Members
| name | description |
|---|---|
| Id { get; } | Gets the unique identifier for this custom form. This identifier is used to reference and manage the form within the Connector UI. |
| abstract IsReadyToCommit { get; } | Gets a value indicating whether the form is ready to be committed (submitted). Derived classes should override this property to provide custom logic for determining when the form contains valid data and can be submitted. |
| BuildDescriptor() | Builds and returns a form descriptor that represents the current state of the custom form. This descriptor contains all the input fields and their current values, which are used by the Connector UI to render the form interface. |
| GetInputContentAsync(…) | Retrieves custom content for a specific input field when requested by the Connector UI. This method is called when the Connector UI needs to display rich content associated with a particular input field, such as images or other media. |
| GetInputFieldsAsync(…) | Retrieves the input fields to display as the contents of this custom form. This method is called when the custom form is initially displayed and after each call to HandleInputUpdatedAsync that returns true. |
| HandleFormSubmissionAsync(…) | Handles the final user action on the custom form, either submission or cancellation. Implementations should use this method to persist form data when the user confirms their input, or to discard changes when the user cancels. |
| HandleInputUpdatedAsync(…) | Handles user input updates on the custom form. This method is called when a user modifies any input field, allowing the custom form implementation to update its internal state and determine whether the form should be refreshed. |
Protected Members
| name | description |
|---|---|
| BaseCustomForm(…) | Initializes a new instance of the BaseCustomForm class with the specified form identifier. |
| InputDescriptors { get; } | Gets the collection of input descriptors currently associated with this form. This collection is populated by the GetInputFieldsAsync method and represents the input fields that should be displayed in the Connector UI. |
| GetDescriptor<T>(…) | Retrieves a specific input descriptor by its identifier from the current form's input descriptors. |
| abstract GetInputContentCoreAsync(…) | When overridden in a derived class, retrieves custom content for a specific input field. This method is called by GetInputContentAsync when the Connector UI needs to display rich content associated with a particular input field. |
| abstract GetInputFieldsCoreAsync(…) | When overridden in a derived class, retrieves the input fields to display in the custom form. This method is called by GetInputFieldsAsync to obtain the form's input descriptors. |
| abstract HandleFormSubmissionCoreAsync(…) | When overridden in a derived class, handles the final user action on the custom form. This method is called by HandleFormSubmissionAsync when the user either submits or cancels the form. |
| abstract HandleInputUpdatedCoreAsync(…) | When overridden in a derived class, handles user input updates on the custom form. This method is called by HandleInputUpdatedAsync when a user modifies an input field. |
| static GetDescriptor<T>(…) | Retrieves a specific input descriptor by its identifier from the provided collection. |
See Also
- interface ICustomForm
- namespace Autodesk.DataExchange.UI.CustomForm