I am looking to add a "password" field to the cck optionwidgets.module. All it really needs to do is the ability to mask the input of a text field.

Can someone take a look at the attached file and tell me if there is something I am missing? The input field works, masking the text input. However, when I try to save the node, I get the error "An illegal choice has been detected. Please contact the site administrator."

Thanks!

CommentFileSizeAuthor
optionwidgets.module.txt19.63 KBspxero

Comments

markus_petrux’s picture

Status: Needs review » Needs work

This is not a patch, so it's hard to tell... please, look at http://drupal.org/patch/create

On the other hand, optionwidgets provides widgets in the form of radios or checkboxes, so there's no possibility to use an element of type password here, AFAICT. Note that these widgets are configured to manage their own multiple values, which is different from standalone Text fields. Maybe what you need is create a separate widget module for CCK Text fields? ...otherwise, it is not clear from your decription what you're trying to do. At least to me. :-|

spxero’s picture

I'm working on putting the patch together right now...

What I am really looking to do is create a text field that has a masked input (dots covering what the user is typing). I am doing this by using the 'password' type of PHP. I think you are right about working in with CCK Text fields instead. I just started with optionwidgets because the code was a little clearer to me.

Thanks for pointing me in the right direction!

summit’s picture

Subscribing, greetings, Martijn