title: Create Joomla admin fields dynamically with javascript
body: <p>I'd like to create an admin form in Joomla where the presence and quantity of some elements are dependent on the options selected for other elements.</p>
  
  <p>For example if you have two calendar elements to allow the selection of a start and end date, then based on the number of days selected I'd like the form to dynamically create that number of text fields (one for each day).</p>
  
  <p>I've done this before in Joomla 1.5, but I had to write all the PHP and JS from scratch. This time I'd like the Joomla form API to do some of the heavy lifting if that is possible.</p>
  
  <p>Thanks</p>