4 Replies Latest reply: Aug 17, 2015 8:30 AM by Marcus Sommer RSS

    Clear specific field with javascript

    Mikael Gerhardsson

      Hi,

       

      I want to clear a specific field when a button is clicked in my extension. The button is a simple input type = button with an id = 'canceldata' where I can catch actions by using:

       

      $("#canceldata").click(function() {

           var doc = Qv.Document;

           console.log(doc);

      });

       

      This works, but I want a function that takes a field name (For example clearField("Year")) as parameter and clears that field of any values selected. Is there such a function? I have scouted the JS API but with no luck.

       

      JsDoc Reference - Qv.Document

       

      Thanks.

      Mikael