SPFieldInteger

Forums SPJS-Utility SPFieldInteger

This topic contains 1 reply, has 2 voices, and was last updated by  Alexander Bautz 4 months ago.

  • 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

You must be logged in to reply to this topic.