FormController

class FormController @Inject constructor(    formSpec: LayoutSpec,     resourceRepository: ResourceRepository,     transformSpecToElement: TransformSpecToElements,     viewModelScope: CoroutineScope)

Controller that manages the user interaction with the payment method data collection form. When all fields are reported as complete, completeFormValues emits the valid payment method.

Parameters

: formSpec A representation of the layout which is used to display the UI fields on screen.

Constructors

Link copied to clipboard
@Inject
fun FormController(    formSpec: LayoutSpec,     resourceRepository: ResourceRepository,     transformSpecToElement: TransformSpecToElements,     viewModelScope: CoroutineScope)

Properties

Link copied to clipboard
val completeFormValues: Flow<Map<IdentifierSpec, FormFieldEntry>?>

Emits a map of the form values when the form content is valid, null otherwise.

Link copied to clipboard
val elements: StateFlow<List<FormElement>?>
Link copied to clipboard
val hiddenIdentifiers: Flow<List<IdentifierSpec>>

List of field identifiers which should not be visible.

Link copied to clipboard
val lastTextFieldIdentifier: Flow<IdentifierSpec?>