blockly > inputs > Input > appendField

inputs.Input.appendField() method

Add a field (or label from string), and all prefix and suffix fields, to the end of the input's field row.

Signature:

appendField<T>(field: string | Field<T>, opt_name?: string): Input;

Parameters

Parameter Type Description
field string | Field<T> Something to add as a field.
opt_name string (Optional) Language-neutral identifier which may used to find this field again. Should be unique to the host block.

Returns:

Input

The input being append to (to allow chaining).