Updated form to ask for number of inputs. Fixed up the click events.
Also added the raw code to change the active element