I have people picker field "Manager" and want it to auto populate in new form with constant value "kumar, brishal" How I can do it using jquery.

I am using below code, when I double click in textbox it show "kumar, brishal" but user will not like this UI. please help

<script  type="text/javascript" src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<link  type="text/css" rel="stylesheet" href="//code.jquery.com/ui/1.11.0/themes/ui-

lightness/jquery-ui.css" /> 
<script  type="text/javascript" 


<script  type="text/javascript" 




2014.02.min.js" type="text/javascript"></script>
<script type="text/javascript" src="//code.jquery.com/ui/1.11.3/jquery-ui.js"></script> 
<script type="text/javascript">

$(document).ready(function() {

 var defaultuser = "kumar, brishal";
$('input[title="Project manager"]').val(defaultuser);



enter image description here

  • just set default value by editing the column – Gopal Zadafiya May 3 '18 at 7:35
  • how? we do not have option to set default value in people picket like choice field – Brishal May 3 '18 at 7:48
  • Sorry, I was not sure about it. – Gopal Zadafiya May 3 '18 at 7:51

You could add a placeholder attribute on the field to hold that value. This way you do not have to have a hard default value for it. Try this:

$('input[title="Project manager"]').attr("placeholder", "kumar, brishal");

That should do it.

Not the answer you're looking for? Browse other questions tagged or ask your own question.