Taylor Scott

Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • in reply to: Rebinding HTML tags to form fields #26012
    Taylor Scott

    This works great also, here’s how I’m using it:

    function customLiveUpdate(){
    	// to work correctly the binders must have the correct class and prefix of element id
    	// the id with the prefix must end in the fin
    	var binderClass = 'p3binderClass';
    	var prefix = 'p3binder_';
    	var f = '';
    //	var customUpdateliveObj = {};
    	var updateTimeout = {};
    	var eleId = '';
    	    $("span[class^='" + binderClass + "']").each(function(){
    				eleId = $(this).attr('Id');	
    				f = eleId.substring(prefix.length);	    	
    	function bindFieldUpdate (f) {
    	    if (updateTimeout[f] === undefined) {
    	        updateTimeout[f] = 0;
    			// Only bind once to each field
    		var update = function(f){
    			jQspjs("#" + prefix + f).html(spjs.utility.getFieldValue({ "fin": f, "delimiter": "; " }));
    	    jQspjs("#dffs_" + f).find("select, input:radio, input:text:first, input:checkbox, .sp-peoplepicker-topLevel")
    	    	.on("change blur", function(e) {
    	        	updateTimeout[f] = setTimeout(function () {
    	        	}, 10);

    ^ whenever I load a new html file into a placeholder (I swap them regularly) I call customLiveUpdate(). It seems to work well. It looks like I can call it as often as a I want and since I’m just using your existing binding all I’m doing is adding a timeout (and not duplicating right)? The only thing I’m unclear about is where the updateTimeout object lives in scope. Since it’s called and instantiated each time I call won’t it recreate and thus reset the timeout even if one existed?

    in reply to: Rebinding HTML tags to form fields #25972
    Taylor Scott

    This is pretty fantastic, and it works well. Any idea what sort of performance it would get if I filled up the object with a few dozen fields throughout the course of the form?

    in reply to: Sorting SPJS Lookup in descending order #25676
    Taylor Scott

    Hi Alex, I’m having a similar issue. My vlookup is running on : v2.2.129, I’m calling the init function successfully w/ no probs, but recently tried to add a sort order. If I leave everything alone (default sort = Title) and change ascending to false (as a test) it still won’t sort descending. If I try to supply a fin to replace title it ignores it completely. I’m passing an object “dd” to the function that calls init() and no matter what I do I can’t change sort order:

        "fieldToConvertToDropdown": [
        "listName": dd.listName,
        "listBaseUrl": siteUrl,
        "optTextFieldInternalName": dd.selectField,
        "pipeDelimitedOptions": "false",
        "optValFieldInternalName": "ID",
        "orderBy": {
            "fin": dd.sortOrder,
            "ascending": true
        "clearInvalidSelections": true,
        "filterObj": {
            "on": dd.filterObject.filterOn,
            "folder": "",
            "CAML": dd.filterObject.CAML,
            "fin": dd.filterObject.fin,
            "isLookup": false,
            "operator": dd.filterObject.operator,
            "filterVal": dd.filterObject.filterVal
        "dropDownDefaultvalue": "",
        "parseFunction": "",
        "addYouOwnValue": {
            "on": false,
            "linkText": "Write your own value"
        "addToExternalList": {
            "on": false,
            "customFunction": null,
            "linkText": "Add new item",
            "saveNewItemText": "Save new item"
        "debug": false,
        "customSort": ""

    Can you help?

Viewing 3 posts - 1 through 3 (of 3 total)