Skip to content

"Placeholder" attribute for text-based inputs #202

@SheaBelsky

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.">

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions