caolan / caolan/forms

"Placeholder" attribute for text-based inputs

Open
#202 5 comments 0 reactions 0 assignees View on GitHub
Feature Requests pull request wanted
Dominant language
JavaScript
Stars
1k
Forks
161
PR merge metrics
No merged PRs in 30d

Description

I noticed the `textarea` widget has a `placeholder` attribute for showing some text before any text is actually input (using the HTML `placeholder` input attribute). Can this functionality be extended to other text-based inputs (`fields.string`, `fields.email`, `fields.password`, `fields.number`) as well? For example:

Full_Name: fields.string({
errorAfterField: true,
placeholder: "Please enter your full name.",
required: validators.required("Please enter your full name."),
validators: [
validators.maxlength(50)
]
}),

produces:

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.