Description

Form abstraction used to create forms not tied to ORM backed models, or to other permanent datastores. Ideal for implementing forms on top of API services, or contact forms. ### Building a form This class is most useful when subclassed. In a subclass you should define the `_buildSchema`, `validationDefault` and optionally, the `_execute` methods. These allow you to declare your form`s fields, validation and primary action respectively. Forms are conventionally placed in the `App\Form` namespace. @implements \UIM\Event\IEventDispatcher<\UIM\Form\Form>

Properties

Methods

InheritedAbstractFinalStaticDatatypeHeader
voidvoid setErrors(Json[string] errors)
Json[string]Json[string] debugInfo(string[] hideKeys = null)
boolbool _execute(Json[string] formData)
IFormIForm set(Json[string] newData)
boolbool execute(Json[string] data, Json[string] options = null)
boolbool initialize(Json[string] initData = null)
DSchemaDSchema _buildSchema(DSchema tableSchema)
voidvoid data(Json[string] items)
boolbool hasKey(string key)
voidvoid schema(DSchema newSchema)
JsonJson getError(string fieldName)
this(DEventManagerthis(DEventManager eventManager = null)
Json[string]Json[string] data()
IEvent[]IEvent[] implementedEvents()
Json[string]Json[string] get(string[] keys)
JsonJson get(string key, Json defaultValue = Json(null))
JsonJson getData(string fieldName = null)
DSchemaDSchema schema()
Json[string]Json[string] getErrors()
boolbool validate(Json[string] data, string validatorName = null)