Class: Google::Apps::Card::V1::TextInput

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/apps/card/v1/card.rb

Overview

A field in which users can enter text. Supports suggestions and on-change actions. For an example in Google Chat apps, see Add a field in which a user can enter text.

Chat apps receive and can process the value of entered text during form input events. For details about working with form inputs, see Receive form data.

When you need to collect undefined or abstract data from users, use a text input. To collect defined or enumerated data from users, use the SelectionInput widget.

Google Workspace Add-ons and Chat apps:

Defined Under Namespace

Modules: Type

Instance Attribute Summary collapse

Instance Attribute Details

#auto_complete_action::Google::Apps::Card::V1::Action

Returns Optional. Specify what action to take when the text input field provides suggestions to users who interact with it.

If unspecified, the suggestions are set by initialSuggestions and are processed by the client.

If specified, the app takes the action specified here, such as running a custom function.

Google Workspace Add-ons:.

Returns:

  • (::Google::Apps::Card::V1::Action)

    Optional. Specify what action to take when the text input field provides suggestions to users who interact with it.

    If unspecified, the suggestions are set by initialSuggestions and are processed by the client.

    If specified, the app takes the action specified here, such as running a custom function.

    Google Workspace Add-ons:



965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
# File 'proto_docs/google/apps/card/v1/card.rb', line 965

class TextInput
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # How a text input field appears in the user interface. For example,
  # whether it's a single line input field, or a multi-line input. If
  # `initialSuggestions` is specified, `type` is always `SINGLE_LINE`,
  # even if it's set to `MULTIPLE_LINE`.
  #
  # [Google Workspace Add-ons and Chat
  # apps](https://developers.google.com/workspace/extend):
  module Type
    # The text input field has a fixed height of one line.
    SINGLE_LINE = 0

    # The text input field has a fixed height of multiple lines.
    MULTIPLE_LINE = 1
  end
end

#hint_text::String

Returns Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible.

Required if label is unspecified. Otherwise, optional.

Returns:

  • (::String)

    Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible.

    Required if label is unspecified. Otherwise, optional.



965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
# File 'proto_docs/google/apps/card/v1/card.rb', line 965

class TextInput
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # How a text input field appears in the user interface. For example,
  # whether it's a single line input field, or a multi-line input. If
  # `initialSuggestions` is specified, `type` is always `SINGLE_LINE`,
  # even if it's set to `MULTIPLE_LINE`.
  #
  # [Google Workspace Add-ons and Chat
  # apps](https://developers.google.com/workspace/extend):
  module Type
    # The text input field has a fixed height of one line.
    SINGLE_LINE = 0

    # The text input field has a fixed height of multiple lines.
    MULTIPLE_LINE = 1
  end
end

#initial_suggestions::Google::Apps::Card::V1::Suggestions

Returns Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed.

For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing Jav, the list of suggestions filters to show just Java and JavaScript.

Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter javascript and others java script. Suggesting JavaScript can standardize how users interact with your app.

When specified, TextInput.type is always SINGLE_LINE, even if it's set to MULTIPLE_LINE.

Google Workspace Add-ons and Chat apps:.

Returns:

  • (::Google::Apps::Card::V1::Suggestions)

    Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed.

    For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing Jav, the list of suggestions filters to show just Java and JavaScript.

    Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter javascript and others java script. Suggesting JavaScript can standardize how users interact with your app.

    When specified, TextInput.type is always SINGLE_LINE, even if it's set to MULTIPLE_LINE.

    Google Workspace Add-ons and Chat apps:



965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
# File 'proto_docs/google/apps/card/v1/card.rb', line 965

class TextInput
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # How a text input field appears in the user interface. For example,
  # whether it's a single line input field, or a multi-line input. If
  # `initialSuggestions` is specified, `type` is always `SINGLE_LINE`,
  # even if it's set to `MULTIPLE_LINE`.
  #
  # [Google Workspace Add-ons and Chat
  # apps](https://developers.google.com/workspace/extend):
  module Type
    # The text input field has a fixed height of one line.
    SINGLE_LINE = 0

    # The text input field has a fixed height of multiple lines.
    MULTIPLE_LINE = 1
  end
end

#label::String

Returns The text that appears above the text input field in the user interface.

Specify text that helps the user enter the information your app needs. For example, if you are asking someone's name, but specifically need their surname, write surname instead of name.

Required if hintText is unspecified. Otherwise, optional.

Returns:

  • (::String)

    The text that appears above the text input field in the user interface.

    Specify text that helps the user enter the information your app needs. For example, if you are asking someone's name, but specifically need their surname, write surname instead of name.

    Required if hintText is unspecified. Otherwise, optional.



965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
# File 'proto_docs/google/apps/card/v1/card.rb', line 965

class TextInput
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # How a text input field appears in the user interface. For example,
  # whether it's a single line input field, or a multi-line input. If
  # `initialSuggestions` is specified, `type` is always `SINGLE_LINE`,
  # even if it's set to `MULTIPLE_LINE`.
  #
  # [Google Workspace Add-ons and Chat
  # apps](https://developers.google.com/workspace/extend):
  module Type
    # The text input field has a fixed height of one line.
    SINGLE_LINE = 0

    # The text input field has a fixed height of multiple lines.
    MULTIPLE_LINE = 1
  end
end

#name::String

Returns The name by which the text input is identified in a form input event.

For details about working with form inputs, see Receive form data.

Returns:

  • (::String)

    The name by which the text input is identified in a form input event.

    For details about working with form inputs, see Receive form data.



965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
# File 'proto_docs/google/apps/card/v1/card.rb', line 965

class TextInput
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # How a text input field appears in the user interface. For example,
  # whether it's a single line input field, or a multi-line input. If
  # `initialSuggestions` is specified, `type` is always `SINGLE_LINE`,
  # even if it's set to `MULTIPLE_LINE`.
  #
  # [Google Workspace Add-ons and Chat
  # apps](https://developers.google.com/workspace/extend):
  module Type
    # The text input field has a fixed height of one line.
    SINGLE_LINE = 0

    # The text input field has a fixed height of multiple lines.
    MULTIPLE_LINE = 1
  end
end

#on_change_action::Google::Apps::Card::V1::Action

Returns What to do when a change occurs in the text input field. For example, a user adding to the field or deleting text.

Examples of actions to take include running a custom function or opening a dialog in Google Chat.

Returns:

  • (::Google::Apps::Card::V1::Action)

    What to do when a change occurs in the text input field. For example, a user adding to the field or deleting text.

    Examples of actions to take include running a custom function or opening a dialog in Google Chat.



965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
# File 'proto_docs/google/apps/card/v1/card.rb', line 965

class TextInput
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # How a text input field appears in the user interface. For example,
  # whether it's a single line input field, or a multi-line input. If
  # `initialSuggestions` is specified, `type` is always `SINGLE_LINE`,
  # even if it's set to `MULTIPLE_LINE`.
  #
  # [Google Workspace Add-ons and Chat
  # apps](https://developers.google.com/workspace/extend):
  module Type
    # The text input field has a fixed height of one line.
    SINGLE_LINE = 0

    # The text input field has a fixed height of multiple lines.
    MULTIPLE_LINE = 1
  end
end

#placeholder_text::String

Returns Text that appears in the text input field when the field is empty. Use this text to prompt users to enter a value. For example, Enter a number from 0 to 100.

Google Chat apps:.

Returns:

  • (::String)

    Text that appears in the text input field when the field is empty. Use this text to prompt users to enter a value. For example, Enter a number from 0 to 100.

    Google Chat apps:



965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
# File 'proto_docs/google/apps/card/v1/card.rb', line 965

class TextInput
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # How a text input field appears in the user interface. For example,
  # whether it's a single line input field, or a multi-line input. If
  # `initialSuggestions` is specified, `type` is always `SINGLE_LINE`,
  # even if it's set to `MULTIPLE_LINE`.
  #
  # [Google Workspace Add-ons and Chat
  # apps](https://developers.google.com/workspace/extend):
  module Type
    # The text input field has a fixed height of one line.
    SINGLE_LINE = 0

    # The text input field has a fixed height of multiple lines.
    MULTIPLE_LINE = 1
  end
end

#type::Google::Apps::Card::V1::TextInput::Type

Returns How a text input field appears in the user interface. For example, whether the field is single or multi-line.

Returns:



965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
# File 'proto_docs/google/apps/card/v1/card.rb', line 965

class TextInput
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # How a text input field appears in the user interface. For example,
  # whether it's a single line input field, or a multi-line input. If
  # `initialSuggestions` is specified, `type` is always `SINGLE_LINE`,
  # even if it's set to `MULTIPLE_LINE`.
  #
  # [Google Workspace Add-ons and Chat
  # apps](https://developers.google.com/workspace/extend):
  module Type
    # The text input field has a fixed height of one line.
    SINGLE_LINE = 0

    # The text input field has a fixed height of multiple lines.
    MULTIPLE_LINE = 1
  end
end

#value::String

Returns The value entered by a user, returned as part of a form input event.

For details about working with form inputs, see Receive form data.

Returns:

  • (::String)

    The value entered by a user, returned as part of a form input event.

    For details about working with form inputs, see Receive form data.



965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
# File 'proto_docs/google/apps/card/v1/card.rb', line 965

class TextInput
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # How a text input field appears in the user interface. For example,
  # whether it's a single line input field, or a multi-line input. If
  # `initialSuggestions` is specified, `type` is always `SINGLE_LINE`,
  # even if it's set to `MULTIPLE_LINE`.
  #
  # [Google Workspace Add-ons and Chat
  # apps](https://developers.google.com/workspace/extend):
  module Type
    # The text input field has a fixed height of one line.
    SINGLE_LINE = 0

    # The text input field has a fixed height of multiple lines.
    MULTIPLE_LINE = 1
  end
end