AnsweredAssumed Answered

Reset button to clear fields on form

Question asked by afunk on Oct 1, 2015
Latest reply on Mar 26, 2018 by



I am looking for a way to create a custom button that when pressed will clear or reset all (and/or selected) fields in the form.


I found a snippet of JavaScript that I hoped would work but it is not clearing the fields.


I've created a simple form with 3 fields; a single line text, a multi line text and a person/group field Named NameOfBox1, NameOfBox2, NameOfBox3 respectively.


The code I am trying to use on client click is;



var obj = NWF$("#" +Choices); 


NWF$("#" + NameOfBox1).val('');

NWF$("#" + NameOfBox2).val('');

NWF$("#" + NameOfBox3).val('');

} );

} );

Any help will be greatly appreciated.