Refresh form without refreshing the page

hey @valerajoey,

hbspt.forms.create({
portalId: ‘2333626’,
formId: ‘9a3ba836-f31f-4869-8d28-d264cc4259a8’,
onFormSubmit: function($form) {
$form[0].reset();
}
});

is this rigth code ? what should be the js here

onFormSubmit: function($form) {
what should i write here ?
}

i tried above code but i am getting error