Hi Marc. Thanks so much for your hard work. I'm creating a Work Order form for staff to submit help desk issues to our IS dept. In the form, I have a 'Requester' lookup field (from User Information List) that I am able to pre-select with the logged in user's name using your SPGetCurrentUser() function. That part works great! I can even set the field ControlMode="Dsiplay" so they can't chaneg the selection.
My issue is that when the form gets submitted, it seems to be submitting a 'null' or blank to the Requester field in the list. Its showing blank for every new record. Here is the code I've embedded into my NewWorkOrder.aspx code right after the <asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server"> tag...
I look forward to your reply.
Thanks!
Mark
My issue is that when the form gets submitted, it seems to be submitting a 'null' or blank to the Requester field in the list. Its showing blank for every new record. Here is the code I've embedded into my NewWorkOrder.aspx code right after the <asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server"> tag...
<script language="javascript" src="/SiteAssets/jquery.min.js" type="text/javascript"></script>
<script language="javascript" src="/SiteAssets/jquery.SPServices.min.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
$(document).ready(function() {
var userFullname = $().SPServices.SPGetCurrentUser({
fieldName: "Title"
});
$("input[Title='Requester']").val(userFullname);
});
</script>
Thoughts as to why the pre-selected user's name is not being submitted to the list?I look forward to your reply.
Thanks!
Mark