Added looping over form elements