In my Office 365 (SharePoint Online) I have a very simple Custom List which consists of a bunch of columns/fields, and I have a requirement that when a user clicks on: Add New Item, The logged user's name or email address will be populated into a PeoplePicker field (EmployeeName), and the logged user's phone number will be populated into another SingleLineText field called (EmployeePhone). Other fields will be filled manually by the user.
How can I accomplish this? Could you please share with me some code/scripts?
For getting the user\s email address and populating it into a PeoplePicker field (EmployeeName) I have used the script below. But, I am not happy with it as it only works with IE, But, NOT other browsers.
I would really appreciate if you could help me to get these two values from user's profile, Delve, or anywhere as long as the code is something I can put inside a Script Editor web part.
Thank you very much.