Quantcast
Channel: jQuery Library for SharePoint Web Services
Viewing all articles
Browse latest Browse all 6517

New Post: Set/Change Column(s) value on new form based on Lookup Column

$
0
0
Ok, after doing a bit of reading, here is a test code I built up and nothing happens. We are using SP Foundation 2013 so, not sure where the issue is. It does not even display the columns.
<script type="text/javascript" src="../../Scripts/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="../../Scripts/jquery.SPServices-2013.02ALPHA3.js"></script>


<script type="text/javascript">

jQuery(document).ready(function($){
$().SPServices.SPDisplayRelatedInfo({       
               columnName: "Customer", 
               relatedList: "{DA112625-44A8-453F-B5D6-A7F5B0531D6E}",
               relatedListColumn: "Title",
               relatedColumns: ["Address", "Customer_x0020_Contact", "Contact_x0020_Phone", "Contact_x0020_E_x002d_Mail"],
               displayFormat: "table", 
        matchOnId: true,
        completefunc: formfill,
               debug: true
});

function formfill() {
    var value1 = $("input[title='"SPDisplayRelatedInfo_" + Customer_x0020_Contact']").val();
    $("input[title='Customer Contact']").val("value1");
}

</script>

Viewing all articles
Browse latest Browse all 6517

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>