added method to check if an input element exists $form->hasElement("foo")