Conditional Form Fields
Jamroom Developers
You'll need to make your own custom module and have it register its own custom form field. Then you can use javascript to turn on/off the fields as they are needed.
Take a look at the jrTags/include.php file it registers a Form Field that uses javascript.
This goes in its _init() function to register,
jrCore_register_module_feature('jrCore', 'form_field', 'jrTags', 'tags');
Then you will find all the code making it go down the bottom of the file.
To see other instances of form fields registered do a codebase search for
_display($_field, $_att = null)
to see the _display function for each form field. all of the form fields will have that one, but sometimes have others like _validate() _assembly() and others to help get it into the right shape.