The easiest thing to do would be to use the "standard" form plugin and call clearForm() or clearFields():
$('#formId').clearForm();
$('#formId [name^=Apikey]').clearFields();
Or, if you don't want or need all the extra form plugin machinery, just grab the source and figure out how clearForm() and clearFields() work. clearFields() is actually quite simple:
$.fn.clearFields = $.fn.clearInputs = function() {
return this.each(function() {
var t = this.type, tag = this.tagName.toLowerCase();
if (t == 'text' || t == 'password' || tag == 'textarea') {
this.value = '';
}
else if (t == 'checkbox' || t == 'radio') {
this.checked = false;
}
else if (tag == 'select') {
this.selectedIndex = -1;
}
});
};
$("el").val("");. But you have special characters in your jQuery selection string which will fail.selectelements.