function formFieldCleaner(formObject) { $(":input", formObject).not(":button, :submit, :reset, :hidden").val("").removeAttr("checked").removeAttr("selected"); } formFieldCleaner("#odesilaciFormular");