Create a hidden character field?
You can with '#type' =&gt; 'password' in  your form.

Ex:

$form['social_sec'] = array(
  '#type' =&gt; 'password',
  '#title' =&gt; t('Social Security'),
  '#description' =&gt; t('Please enter your social security number'),
  '#size' =&gt; 9,
  '#maxlength' =&gt; 9,
  '#required' =&gt; TRUE,
);


If you want this as a field in a node's form, then you will have to use hook_form_BASE_FORM_ID_alter and alter an already existing field.