blockly > Input > insertFieldAt

Input.insertFieldAt() method

Inserts a field (or label from string), and all prefix and suffix fields, at the location of the input's field row.


insertFieldAt<T>(index: number, field: string | Field<T>, opt_name?: string): number;


Parameter Type Description
index number The index at which to insert field.
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.



The index following the last inserted field.