views:

25

answers:

2

There is a way to use a Single Line text field when creating a column in Sharepoint Services 3.0 and that field behaves as a Paswword field (hiding what the user entered) ?

Thanks in advance!

+1  A: 

You can develop a custom field if you have the capability. Of course you can play around the replacing the HTML control in runtime using Javascript, but I would not recommend it

Vladi Gubler
Thanks!... as I would need to set how the field is rendered in list and in other forms... I suppose the javascript approach is not an option.
Romias
You can do pretty neat things with JS, but you need to make sure it works with all browser versions, that nothing gets in the way, so it's basically not worth it, unless you have to
Vladi Gubler
+1  A: 

MSDN - How to create a custom field type

This topic provides an overview of the process of creating a custom field type and defining how it renders on list views and on the Display, New, and Edit forms.

For a concrete example of creating a custom field and defining its rendering, see Walkthrough: Creating a Custom Field Type.

The alternative 'hacky but pragmatic way' is as Vladi suggests using some Javascript (perhaps in a CEWP) to modify the pages HTML.

You would want to find the field INPUT tag and change the type to Password (this will then use * instead of chars).

This post gives you an walkthrough of opening up a New/Edit.asp form in edit mode, adding a CEWP that contains JavaScript and modifying the page. Its not exactly what you want but will get you started.

Ryan
Thanks!... as I would need to set how the field is rendered in list and in other forms... I suppose the javascript approach is not an option.
Romias
You can use the javascript option but you would have to add the CEWP to each page that displays the list. To be sure its hacky and 'security though obscurity' though - you would be better with the custom field then you can store the password encrypted, control when it gets decrypted (e.g. only certain users/processes) or even better just store a one way hash.
Ryan