Last Updated: 18 Jul 2022 17:23 by n/a
Created on: 24 Jun 2022 07:09
Category: UI for Blazor
Type: Feature Request
EditorType for password fields


Passwords are not yet supported. There is a DataAnotations Datatype for that. So technically this is possible and should not be a big deal. Almost all apps have a password entry somewhere. 


    class LoginModel
        [Display(Name = "User Name")]
        public string UserName { get; set; }

        [Display(Name = "Password")]
        public string Password { get; set; }

Annoying because then you have to do the form fields all manually because of the password.

Thanks for considering.

Best regards, Michael

Posted on: 18 Jul 2022 17:23

While we wait, if anyone is interested, I am using this "low tech" workaround. Pure javascript solution. Basically, find the label in the form whose text is 'Password' or whatever you set it to. Then find the parent input element and change the html type to password.


function fixPasswordField() {
$("label:contains('Password')").parent().find('input').attr('type', 'password');
Nadezhda Tacheva
Posted on: 18 Jul 2022 17:10

Hi Michael and Robert,

After further discussion with the team, we've considered it will indeed be useful to expose some option that allows rendering of appropriate editors for password fields. Having in mind the current form design and the details I shared in my previous post, this enhancement will most likely be handled through adding one more EditorType targeting password fields rather than DataType attribute. Thus, we can keep the form configuration consistent and yet allow flexibility for a password field editor.

I have reworded the title to more specificaly cover the feature. I have added both of your votes to increase the popularity of the item as we prioritize the enhancements implementation based on the community interest and demand. You can follow the request to be notified via email on status updates. This is the easiest way to follow the progress of the item.

For the time being, the workaround will be to use a FormItem Template for the password fields. Indeed, when the Template is used the built-in validation messages will not be rendered. However, you can include validation messages as shown in the Add validation messages to templated Form Items section.

Nadezhda Tacheva
Progress Telerik

The Premier Dev Conference is back! 

Coming to you live from Progress360 in-person or on your own time, DevReach for all. Register Today.

Posted on: 12 Jul 2022 00:35
Also, FormItem Template does not quite cut it, because you lose some things like inline errors.
Posted on: 12 Jul 2022 00:19
"I realize that password is not currently supported." Any idea when this is coming? I can't really launch my application without a proper password box. Not quite sure how this is not already a feature. Virtually every website out there has masked inputs.
Nadezhda Tacheva
Posted on: 30 Jun 2022 16:41

Hi Michael,

We have considered support for the DataType attribute in regards to enhancing the component and provide flexibility over the generated editors. After revision and discussions on our end, we have decided to proceed with a different approach - we introduced the EditorType property which allows you to set your desired editor for the specific data type.

We've considered that this approach has more advantages compared to support for DataType attribute. For example, not all supported DataTypes can be mapped to a specific component, so their support will not have value. In addition, with the current approach we provide more flexibility as we allow one to choose different editors for specific data type. For instance, strings can be edited via TextBox or TextArea. DateTime data can be edited through DatePicker, DateTimePicker or TimePicker.

I realize that password is not currently supported. However, introducing support for DataType attribute at this stage will be in conflict with the Form configuration for the EditorType. That said, it will be useful if you can share your feedback here.

Currently, one can add a password filed in the form through FormItem Template as we have discussed in your private ticket. Would you consider this approach useful and easy to implement or you'd rather have some built-in functionality for password fields? It cannot be handled with DataType support but we might consider other alternative based on the community demand.

Nadezhda Tacheva
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.