Skip to content

"Placeholder" attribute for text-based inputs #202

Description

@SheaBelsky

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:

<input type="text" name="Full_Name" placeholder="Please enter your full name.">

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions