I want to alter an existing Drupal form built with form API to contain a hidden password field. (I.e. I want to create a honeypot field in the form that only 'bots will see and fill in, while humans will leave this field it empty).
The HTML I want included in the form shall be something like this:
<input type="password" name="password" style="display:none;" />
I've looked at hook_FORM_ID_alter
, but so far I haven't seen how it can help me with this.
I think I am looking for a way to theme this particular field, some way to manipulate the HTML after it has been rendered, but before it shown to the human (or 'bot), but I am open for other answers as well.
(For what it is worth: I am using Drupal 7.)