Password controls, struggles most of us, specially when that need to be done on CRM form in a supported way. There are many solutions for this with unsupported customization and by playing with Jquery to DOM.
But in an attempt to look closer on how forms are rendered/managed, I came across a formXML tag which can do the magic and since this is a SDK documented thing, I can think about no reason to consider it un-supported! In formXML ,we can make a use of <IsPassword> tag to have our control behave like a password field right inside crm without JQuery – XML game.
Scroll below for detailed implementation steps –
1) Add concerned entity in a new/empty unmanaged solution (New solution is convenient because other components in solution will make it harder to locate a required control)
2) Export the solution, save .zip file and extract its content to a new folder. (Extract in a separate folder because we are going to need these files later…)
3) Open “customization.xml” file into preferred editor.
4) Locate formxml inside your entity tag.
5) Locate the exact control tag which you are interested in. It can be identified by looking at the description or name or id attributes along.
Also to locate your required control tag into big & messy formxml, simply assume the form structure in a row to column matrix/mesh.
That is how an entity form is structured. This will help you to go directly into your row of interest to find the control tag.
6) Once correct control tag is identified, add separate closing tag (</control>) for control instead of one liner close tag (/>).
7) Add <IsPassword> tag from image within the control tag as shown, save the file and create .zip file again using all the exported files from STEP 2 above.
8) Import this zip file, publish customizations and you are DONE! Try typing into this attribute in your entity form so see the effect.
Happy coding !!!