kvision / pl.treksoft.kvision.form

Package pl.treksoft.kvision.form

Convenient forms implementation, with support for many different input components and easy to define validation.

Types

BoolFormControl

interface BoolFormControl : FormControl

Base interface of a form control with a boolean value.

DateFormControl

interface DateFormControl : FormControl

Base interface of a form control with a date value.

FieldLabel

open class FieldLabel : Tag

Helper class for HTML label element.

Form

class Form<K : Any>

The form definition class. Can be used directly or indirectly inside a FormPanel.

FormControl

interface FormControl : Component

Base interface of a form control.

FormEnctype

enum class FormEnctype

Form encoding types.

FormHorizontalRatio

enum class FormHorizontalRatio

Proportions for horizontal form layout.

FormInput

interface FormInput : Component

FormMethod

enum class FormMethod

Form methods.

FormPanel

open class FormPanel<K : Any> : SimplePanel

Bootstrap form component.

FormTarget

enum class FormTarget

Form targets.

FormType

enum class FormType

Bootstrap form layout options.

HelpText

open class HelpText : Tag

Helper class for Bootstrap help text element.

InputSize

enum class InputSize

Input controls sizes.

InvalidFeedback

open class InvalidFeedback : Tag

Helper class for Bootstrap invalid feedback element.

KFilesFormControl

interface KFilesFormControl : FormControl

Base interface of a form control with a list of files value.

NumberFormControl

interface NumberFormControl : FormControl

Base interface of a form control with a numeric value.

StringFormControl

interface StringFormControl : FormControl

Base interface of a form control with a text value.

ValidationStatus

enum class ValidationStatus

Input controls validation status.

Extensions for External Classes

kotlin.collections.Map

kotlin.js.Json

Functions

fieldLabel

fun Container.fieldLabel(forId: String, content: String? = null, rich: Boolean = false, classes: Set<String> = setOf("control-label"), init: (FieldLabel.() -> Unit)? = null): FieldLabel

DSL builder extension function.

formPanel

fun <K : Any> Container.formPanel(method: FormMethod? = null, action: String? = null, enctype: FormEnctype? = null, type: FormType? = null, condensed: Boolean = false, horizRatio: FormHorizontalRatio = FormHorizontalRatio.RATIO_2, classes: Set<String> = setOf(), customSerializers: Map<KClass<*>, KSerializer<*>>? = null, init: (FormPanel<K>.() -> Unit)? = null): FormPanel<K>

DSL builder extension function.