how to set input type as password using forms tag helper

1 Answer 832 Views
Form TextBox
Henri
Top achievements
Rank 1
Henri asked on 11 Feb 2022, 08:25 AM

in the form using tag helpers, how can I set textbox-editor as password?

                    <form-item field="Password">
                        <item-label />
                        <textbox-editor ></textbox-editor> ???????????
                    </form-item>

 

   

1 Answer, 1 is accepted

Sort by
0
Mihaela
Telerik team
answered on 15 Feb 2022, 04:33 PM

Hello,

You could add ' type="password" ' to the form field tag by using the attribute "html-attributes". 

Here is an example:

<form-item field="Password" html-attributes='new Dictionary<string,object> { ["type"] = "password" }'>
  <item-label />
  <textbox-editor></textbox-editor>
</form-item>

 

 

Regards, Mihaela Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Form TextBox
Asked by
Henri
Top achievements
Rank 1
Answers by
Mihaela
Telerik team
Share this question
or