SPFieldInteger

Forums SPJS-Utility SPFieldInteger

Viewing 1 reply thread
  • Author
    Posts
    • #20219
      lzuhuo
      Participant

      Hi Alex

      Could you add a support to get Field value from SPFieldInteger type on SPJS-utility? Thanks

    • #20237
      Alexander Bautz
      Keymaster

      Hi,
      Yes, I can do that. I’ll add it in the next release. In the meantime you can add this to your custom js in the form:

      // set
      spjs.utility.setFieldValue_SPFieldInteger = function (a) {
          var f = jQspjs(spjs.utility.data.fields[a.fin]);
          f.find('input').val(a.newVal).trigger("change");
      }
      // get
      spjs.utility.getFieldValue_SPFieldInteger = function(a){
          return jQspjs(spjs.utility.data.fields[a.fin]).find('input').val();
      }

      When this is added you can use getFieldValue and setFieldValue to get/set.

      Alexander

Viewing 1 reply thread
  • You must be logged in to reply to this topic.