FormField

sealed class FormField

Description of a single form field. The host owns rendering, how errors show, file picking, and upload preparation; Engine checks the answers (see EngineError.InvalidFormInput). Each variant is answered by the matching FormFieldValue variant.

Inheritors

Types

Link copied to clipboard
data class Bool(val name: String, val displayName: String?, val description: String?, val isRequired: Boolean, val defaultValue: String?) : FormField
Link copied to clipboard
data class DateTime(val name: String, val displayName: String?, val description: String?, val isRequired: Boolean, val defaultValue: String?, val subtype: DateTimeSubtype) : FormField
Link copied to clipboard
data class File(val name: String, val displayName: String?, val description: String?, val isRequired: Boolean, val defaultValue: String?, val subtype: FileSubtype) : FormField
Link copied to clipboard
data class Number(val name: String, val displayName: String?, val description: String?, val isRequired: Boolean, val defaultValue: String?, val subtype: NumberSubtype) : FormField
Link copied to clipboard
data class Text(val name: String, val displayName: String?, val description: String?, val isRequired: Boolean, val defaultValue: String?, val subtype: TextSubtype) : FormField

Properties

Link copied to clipboard
abstract val defaultValue: String?

The workflow's default answer, as text; the host parses it for the field's type.

Link copied to clipboard
abstract val description: String?
Link copied to clipboard
abstract val displayName: String?
Link copied to clipboard
abstract val isRequired: Boolean
Link copied to clipboard
abstract val name: String

The field's key, which its answer carries as FormFieldValue.fieldName.