kvision / pl.treksoft.kvision.form / FormPanel / add

add

open fun <C : FormControl> add(key: String, control: C, required: Boolean = false, validatorMessage: (C) -> String? = null, validator: (C) -> Boolean? = null): FormPanel<K>

Adds a control to the form panel.

Parameters

key - key identifier of the control

control - the form control

required - determines if the control is required

validatorMessage - optional function returning validation message

validator - optional validation function

Return
current form panel