Skip to content
docsv0.17.0

FormField

The static shape of one form field derived from a schema property: its name (the property key), base type, human label, whether it is required, its default, and its constraints.

FormField::__construct()

public function __construct(string $name, Milpa\Live\Schema\FieldType $type, string $label, bool $required, ?mixed $default, Milpa\Live\Schema\FieldConstraints $constraints):

Parameters

Parameters of __construct()
NameTypeDescription
$namestring
$typeMilpa\Live\Schema\FieldType
$labelstring
$requiredbool
$default?mixed
$constraintsMilpa\Live\Schema\FieldConstraints