3 Replies Latest reply on Feb 25, 2015 12:41 PM by BDKaufman

    how do you set the format of a text field

    BDKaufman Level 1

      I have a form with a text field that I want to set to either date format or number format depending on the selection of a radio button. Is there a way to do that via javascript?

       

      var f = getField("txtAgeDOB1");

      var initVal = f.value;

       

       

      if (initVal == "Age") {

      f.format = number;

      } else {

      f.format = date;

      }