Stay organized with collections
Save and categorize content based on your preferences.
blockly > inputs > Input > appendField
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).
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-18 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-18 UTC."],[[["The `appendField` method adds a field (or label) to the end of a block input's field row."],["It accepts a field object or a string for the field content, and an optional name for identifying the field."],["The method returns the input object, allowing for chaining of multiple `appendField` calls."]]],["The `appendField` method adds a field or a string label to the end of an input's field row. It accepts either a string or a `Field` object as the `field` parameter. An optional `opt_name` parameter, a unique identifier, can also be provided for later retrieval. The method returns the modified `Input` object, enabling method chaining. This allows to append multiple field in a row.\n"]]