FormController

class FormController @Inject constructor(formSpec: LayoutSpec, addressResourceRepository: ResourceRepository<AddressRepository>, 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, addressResourceRepository: ResourceRepository<AddressRepository>, transformSpecToElement: TransformSpecToElements, viewModelScope: CoroutineScope)

Properties

Link copied to clipboard

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

Emits a map of the form values that are complete, empty otherwise.

Link copied to clipboard

List of field identifiers which should not be visible.

Link copied to clipboard