The problem is to add a checkbox to a PHP/HTML_Quickform form that toggles a password input from masked to unmasked and back. This can be done with JavaScript, but how to add the JavaScript code to the form and how to wire it to the form elements?
Share
Well, the code can be added via a static Quickform element and the wiring can be done by means of attribute arrays.
Here is the code for the form elements:
and here is the code to add the JavaScript that does the job: