Attribute input types

When viewed from the Admin, attributes are the fields that you complete when you create a product. The input type that is assigned to an attribute determines the type of data that can be entered and the format of the field or input control. From the standpoint of the customer, attributes provide information about the product, and are the options and data entry fields that must be completed to purchase a product.

Input types

Property
Description
Text Field
A single-line input field for text.
Text Area
A multiple-line input field for entering paragraphs of text, such as a product description. You can use the WYSIWYG Editor to format the text with HTML tags, or enter the tags directly into the text.
Text Editor
A fully functioning text editor at the attribute location.
Date
Displays a date value in the preferred format and time zone. Date values can be selected from a list or a calendar ( Calendar icon ).

Note: Depending on your system configuration, Admin users can enter dates directly into a field or select a date from the calendar or list. For information about specifying date and time values, see Date and time options.
Date and Time
Displays a date and time value in the preferred format and time zone. The date and time can be entered manually or selected from a calendar. Example format: MM/DD/YYYY HH:MM
Yes/No
Displays a drop-down list with pre-defined options of Yes and No.
Dropdown
Displays a drop-down list of values that accepts only a single selection. The Dropdown input type is a key component of configurable products.
Multiple Select
Displays a drop-down list of values that accepts multiple selections.
Price
This input type is used to create price fields that are in addition to the predefined attributes: Price, Special Price, Tier Price, and Cost. The currency used is determined by your system configuration.
Media Image
Associates an extra image with a product, such as a product logo, care instructions, or ingredients from a food label. When you add a media image attribute to the attribute set of a product, it becomes an extra image type, along with Base, Small, and Thumbnail. The media image attribute can be excluded from the storefront media browser.
Fixed Product Tax
Lets you define FPT rates based on the requirements of your locale.
Visual Swatch
Displays a swatch that depicts the color, texture, or pattern of a configurable product. A visual swatch can be filled with a hexadecimal color value, or display an uploaded image that represents the color, material, texture, or pattern of the option.
Text Swatch
A text-based representation of a configurable product option that is frequently used for size. Text swatches can also include hexadecimal color values.
Page Builder
A Page Builder workspace at the attribute location that makes it easy to add engaging content to the product page.

Date and time options

You can customize the format of date and time fields, and select the input control that is used for data entry. Dates values can be selected from a drop-down list, or pop-up calendar.

Example - storefront popup calendar

To format date/time fields:

  1. On the Admin sidebar, go to Stores > Settings > Configuration.

  2. In the panel on the left, expand Catalog and click the Catalog subitem.

  3. Expand the Date & Time Custom Options section.

    Catalog configuration - date and time options {width="600" modal="regular"}

    For a detailed listing of these options, see Date & Time Custom Options in the Configuration Reference.

  4. To use a popup calendar as the input control for date fields, set Use JavaScript Calendar to Yes.

  5. To establish the Date Fields Order, set the order of each part of the date field as needed:

    • Month
    • Day
    • Year
  6. To set your preferred time format, set Time Format to one of the following:

    • 12h AM/PM
    • 24h
  7. To establish the Year Range for the drop-down values, enter the year (YYYY) to set the from and to dates.

    If blank, the field defaults to the current year.

  8. When complete, click Save Config.

recommendation-more-help
af062d56-f22c-4537-813d-bedf8b92a071