Stay organized with collections
Save and categorize content based on your preferences.
blockly > FieldTextInput
FieldTextInput class
Class for an editable text field.
Signature:
export declare class FieldTextInput extends FieldInput<string>
Extends: FieldInput<string>
Constructors
Methods
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 2025-05-16 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 2025-05-16 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eFieldTextInput\u003c/code\u003e class in Blockly is used to create editable text fields within blocks.\u003c/p\u003e\n"],["\u003cp\u003eIt extends the \u003ccode\u003eFieldInput\u003c/code\u003e class, specifically handling string inputs.\u003c/p\u003e\n"],["\u003cp\u003eThis class provides a constructor for creating new instances and a \u003ccode\u003edoClassValidation_\u003c/code\u003e method to ensure the input value is a valid string.\u003c/p\u003e\n"]]],[],null,["[blockly](./blockly.md) \\\u003e [FieldTextInput](./blockly.fieldtextinput_class.md)\n\nFieldTextInput class\n--------------------\n\nClass for an editable text field.\n\n**Signature:** \n\n export declare class FieldTextInput extends FieldInput\u003cstring\u003e \n\n**Extends:** FieldInput\\\u003cstring\\\u003e\n\nConstructors\n------------\n\n| Constructor | Modifiers | Description |\n|----------------------------------------------------------------------------------------------------------|-----------|---------------------------------------------------------|\n| [(constructor)(value, validator, config)](./blockly.fieldtextinput_class._constructor__1_constructor.md) | | Constructs a new instance of the `FieldTextInput` class |\n\nMethods\n-------\n\n| Method | Modifiers | Description |\n|-----------------------------------------------------------------------------------------------|-------------|------------------------------------------------------|\n| [doClassValidation_(newValue)](./blockly.fieldtextinput_class.doclassvalidation__1_method.md) | `protected` | Ensure that the input value casts to a valid string. |\n| [initView()](./blockly.fieldtextinput_class.initview_1_method.md) | | |"]]