I have designed K2 Smart Form for Request Submission.I have a sharepoint Form Field called "Requester Name". While Loading i have to Pre-populate the currenly Login User into "Requester Name" Field.
Kindly Please help on this.
I have designed K2 Smart Form for Request Submission.I have a sharepoint Form Field called "Requester Name". While Loading i have to Pre-populate the currenly Login User into "Requester Name" Field.
Kindly Please help on this.
Hi,
try out the below jquery, it gets you the logged in user name with repsect to SharePoint and map it back to the smartforms data label. i havent tried it completely, let me know if you face any issue.
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"> </script> <script type="text/javascript"> var thisUserAccount ; $(document).ready(function() { thisUserAccount= $().SPServices.SPGetCurrentUser({ fieldName: "Name", debug: false }); $('data label').val = thisUserAccount; } ); </script>
Hope it helps!
Cheers,
Prajwal Shambhu
Hi Prajwal Shambhu ,
Thanks a lot for Your quick reply. I am new to K2 BlackPearl.
Do you provide details about how to Refer Javascript in K2 SmartForm.
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.