Stay organized with collections
Save and categorize content based on your preferences.
blockly > FieldCheckbox > getText
FieldCheckbox.getText() method
Get the text of this field. Used when the block is collapsed.
Signature:
getText(): string;
Returns:
string
Text representing the value of this field ('true' or 'false').
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."],[[["`FieldCheckbox.getText()` retrieves the textual representation of the checkbox field's value."],["This method is primarily used when the block is in a collapsed state, providing a concise representation of the checkbox's checked/unchecked status."],["The returned text will be either 'true' or 'false', corresponding to the checkbox's state."]]],["The `FieldCheckbox.getText()` method retrieves the textual representation of a checkbox field's value. This method, utilized when a block is collapsed, returns a string indicating the checkbox's state. The returned string will be either 'true' if the checkbox is checked or 'false' if it is unchecked. The method's signature indicates that no parameters are taken.\n"]]