changed addInput to allow for 'required' flags.

can now flag an input as 'required'.