How to Reset form Data in Meteor JS? -
i need know reset form data in meteor.i using router package.whenever clicks submit button if data saved reset form , show same form save , add else not saved show user entered data no need reset.
here using router.go("tempatename");.the tempatename form template.
use router.go("tempatename") means renders again same page not clear data.why it's not clear data don't know.so please suggest me or there alternate?
thanks in advance.
if go same route iron router think not going anywhere route loaded! (it not trigger page refresh) simple form reset jquery after submitting data:
//submit data .... //reset form $('.my-form').reset();
Comments
Post a Comment