danog\MadelineProto\WebUI\Field: A form field.
Author: Daniil Gentili daniil@daniil.it
A form field.
Properties
$name:string$label:string$type:danog\MadelineProto\WebUI\FieldType$value:string$placeholder:string$hint:(danog\MadelineProto\WebUI\SafeHtml | string)$required:bool$autocomplete:?string$options:array$showWhen:?array$autofocus:bool$maxLength:?int
Method list:
__construct(string $name, string $label, \danog\MadelineProto\WebUI\FieldType $type = \danog\MadelineProto\WebUI\FieldType::TEXT, string $value = '', string $placeholder = '', \danog\MadelineProto\WebUI\SafeHtml|string $hint = '', bool $required = true, ?string $autocomplete = NULL, array<string, string> $options = [], ?array{0: string, 1: string} $showWhen = NULL, bool $autofocus = false, ?int $maxLength = NULL)jsonSerialize(): arraygetInputAttributes(string $id): array<string, (scalar|null)>
Methods:
__construct(string $name, string $label, \danog\MadelineProto\WebUI\FieldType $type = \danog\MadelineProto\WebUI\FieldType::TEXT, string $value = '', string $placeholder = '', \danog\MadelineProto\WebUI\SafeHtml|string $hint = '', bool $required = true, ?string $autocomplete = NULL, array<string, string> $options = [], ?array{0: string, 1: string} $showWhen = NULL, bool $autofocus = false, ?int $maxLength = NULL)
Parameters:
$name:stringName of the POST parameter$label:stringLabel$type:\danog\MadelineProto\WebUI\FieldType$value:string$placeholder:string$hint:\danog\MadelineProto\WebUI\SafeHtml|string$required:bool$autocomplete:?stringValue of the autocomplete attribute$options:array<string, string>Value => label, for {@see FieldType::CHOICE}$showWhen:?array{0: string, 1: string}Only show (and submit) the field when the CHOICE field with the given name has the given value$autofocus:bool$maxLength:?int
See also:
\danog\MadelineProto\WebUI\FieldType: Type of a form field.\danog\MadelineProto\WebUI\SafeHtml: A trusted HTML fragment, output as-is by templates instead of being escaped.
jsonSerialize(): array
getInputAttributes(string $id): array<string, (scalar|null)>
Get the attributes of the input element.
Parameters:
$id:string
See also:
scalar
Generated by danog/phpdoc