I have a form field in Drupal which I need some help with.
The requirement is to have the field show up as a simple input field, but to have a toggle button against it which would convert it into a multi-line text box for users who wish to enter more data.
In traditional PHP/HTML/Javascript this would be dead easy -- two fields; one styled with visibility:hidden; and a short js function on a button to toggle the visibility style of the two fields.
But I can't see how to translate this concept into the Drupal forms API. Can anyone help?
I'm experienced with PHP but an absolute beginner with Drupal, by the way. I'm still feeling my way around it, so please bear with me if I've asked something really obvious.