Reset form when page refreshed

Hi,

When I refresh the page it doesn't reset the form nor does it clear all the fields. Is there a bug? No errors appear in the console.

This code doesn't clear anything when I refresh the page or reload the page:

function clearform(){
    if (fd.form.formType = "new"){
    fd.clear();
    }
};

clearform();

Dear @DryChips,
Where did you copy this code from? It should be like this:

function clearform(){
    if (fd.formType == 'New'){
      fd.clear();
    }
};

clearform();
1 Like

Thanks NIkita, it was from here. Can't remember where from though.