Skip to content

Pattern Input Mask - Support a custom placeholder text #10831

@JaneSjs

Description

@JaneSjs

A regular text input field can display a placeholder:

{
  "pages": [
    {
      "name": "page1",
      "elements": [
        {
          "type": "text",
          "name": "question1",
          "placeholder": "Enter something..."
        }
      ]
    }
  ]
}
Image

However, an input field with the "pattern" input mask doesn't define a user-defined placeholder.
Suggestion: display a user-defined placeholder until the masked field receives focus or a user enters a value. Once a user clicks into the masked field, the placeholder should disappear.

{
  "pages": [
    {
      "name": "page1",
      "elements": [
        {
          "type": "text",
          "name": "question1",
          "maskType": "pattern",
          "maskSettings": {
            "pattern": "aaa"
          },
          "placeholder": "Enter something..."
        }
      ]
    }
  ]
}

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions