add gem and clearForm function in js