javascript: automatically fill in the field based on your ID

I am trying for days to solve a problem that I have in a Sharepoint list. I'm quite new to JavaScript, so I can't do many complex things and I think this is the reason I still don't get an answer.

So, I have a list of shared points where I have the login of the person submitting the form using the formula = [ME] and then I want to automatically complete the "Line Manager" field with the email from your line administrator. That email is on another list called "LineManagers Email", which I have all the emails from the line managers associated with the employee identification.
I search the web for ways to do it, but I can only find answers through the search versions. It is not feasible because I cannot allow the person submitting the form to choose their ID.

Let me know if you can help me.

Thank you

JavaScript events: how to dynamically fill a drop-down input box

I am creating an application that will be driven by a series of URL calls. The first step is to show an empty input box or a selection box. When the user enters a character, that character is inserted as a parameter in a URL and a list is returned to complete the drop-down menu.

This seemed simple, create a box, wait for the event & # 39; keyup & # 39 ;, get the list and complete the list of data. Then, wait for the user to select from the list or press another key and then continue with autocomplete or proceed to the next step in the process.

I have encountered numerous problems that tell me that I really do not understand how to do this. Do some have a good example or explanation of how to do this?

I am using javascript and D3 along with some other incidental code.

I had no real problem creating the box, writing the first character, calling the URL or returning to the list. When I try to complete the list, only part of the list appears before the page locks and stops responding.

There is nothing fancy in the code, but it is in the options.enter () the process stops. (& # 39; input box & # 39;) .attr (& # 39; value & # 39 ;, null);
options let = (& # 39; datalist & # 39;) .selectAll (& # 39; option & # 39;) .data ());
options.exit (). remove ();
options.enter (). append (& # 39; option & # 39;) .each (function (d) {this.value = d}); (& # 39; # VAWfund_id & # 39;) .on (& # 39; select & # 39 ;, fundIdChanged);

Some of the problems are:
1. When I first click on the box, a list appears, I don't know where it comes from, but it is consistent and related to my environment.
2. The process fails and kills the web page.
3. I am not sure how to differentiate between writing characters and selecting options that will begin the next step in the process.

python 3.x – It will be useful to create in this problem an empty string este ’and then fill it with the result that will finally be printed

Thank you for contributing to StackOverflow in Spanish with an answer!

  • Please make sure answer the question. Provide information and share your research!

But avoid

  • Ask for help or clarification, or respond to other answers.
  • Make statements based on opinions; Be sure to back them up with references or with your own personal experience.

For more information, see our tips on how to write great answers.

enterprise sharepoint: you cannot edit a Choice field with check boxes and fill options

I am a fairly novice SP user, however, I have encountered a problem. I have created a list, and one of the columns is a & # 39; Choice & # 39; with check boxes so that users can select several items. When I set & # 39; Allow padding options & # 39; In No, everything works fine. However, when I set it to Yes, suddenly that field becomes uneditable. When I'm going to create a new item, it works fine. However, if I try to edit the list directly, there is no drop-down menu and there is no way to edit that field.

What it looks like with & # 39; Allow padding & # 39; set to No
When set to Yes [! [The & # 39; New item & # 39; works fine] 3

& # 39; New item & # 39; works fine & # 39;

It does not work

This is what it looks like when I try to edit this field in the list.

7 – Fill the selection list of a taxonomy term field

I am trying to fill a selection list dynamically by extracting its values ​​from a taxonomy term field linked to the current user account. Just to clarify, the following function is a link defined by a module that comes with a custom installation profile. It is basically used to create fields in a specific form.
So, my custom module has-

function some_function_attributes() {

      global $user;
      $user_fields = user_load($user->uid);
      $termid = $user_fields->field_user_organization('und')('0')('tid');
      $taxonomy_term = taxonomy_term_load($termid);
      $options = field_get_items('taxonomy_term', $taxonomy_term, 'field_org_environment','select');
      return array(
        'environment' => array(
        'type' => 'select',
        'options' => $options,
        'name' => t('Environment'),

Allowed values ​​in the field (for this user):

E1 | Env1

E2 | Env2

Here is the development screenshot for dsm($options);
enter the description of the image here

So, you are populating the right field but not in the way you should.

The real form element looks like this:
enter the description of the image here

Currently, it's just returning the array and I can't understand what I missed. I've been banging my head against the wall for this …
How would you fill Env1 and Env2 in this selection list?

Mac terminal fill

Is it possible to add window padding to This is what it looks like today …

Mac without edge fill
and this is how I would like it to look …

iTerm2 with edge fill
iTerm2 with padding

Empty sites do not fill the entire site

enter the description of the image here

I have reviewed other projects of mine and they are all full height.
Also, I have not changed anything about this in my style.css in my child theme.
Thanks in advance!

Actions that include layer fill.

I am operating on Windows in CC2019.

I am writing an action in which I include a layer fill. I want it so that when I execute the action, it fills the layer with the foreground color that I have selected at the time of executing the action each time I execute it.

But every time I record the action, it embeds the color value of the foreground color (for example, 100% cyan) at the time of recording. Therefore, each time I run it later it is filled with 100% cyan regardless of the selected foreground color.

I know I can stop it there so that I can select the color manually, but executing actions hundreds of times I prefer to prevent that from happening.

Does anyone have a way around this? I am open to using JavaScript, but I would not have the ability to write it myself.

Thank you.

form – Fill in field in Social Load feed SharePoint 2013

I am trying to automatically complete the email, name and title of the user in a sharepoint form. I can see the values ​​when I inspect the page (F12) but they do not appear on the form when loading. I get the identification of the input fields through the developer tool, I am not 100% sure that I am using the correct identification.

Here is the code I am using:

$(function () {


getUserProfileInfo () function {

var fullUrl = "https://sites/sites/dome/_api/social.feed/my";

    url: fullUrl,
    type: "GET",
    headers: {
        "accept": "application/json;odata=verbose",
        "content-type": "application/json;odata=verbose",
    success: onUserInfoQuerySucceeded,
    error: onQueryFailed


function onUserInfoQuerySucceeded (data) {
var userInfoItemE = data.d.Me.EmailAddress;
var userInfoItemN = data.d.Me.Name;
var userInfoItemT = data.d.Me.Title;

document.getElementById('Email_a6570af6-8b72-4ab0-814d-93f50f26e185_$TextField').innerHTML = userInfoItemE;
document.getElementById('Name_b6023c0f-43be-45b4-b946-22ac2933bb77_$TextField').innerHTML = userInfoItemN;
document.getElementById('Title_fa564e0f-0c70-4ab9-b863-0177e6ddd247_$TextField').innerHTML = userInfoItemT;

function onQueryFailed (sender, arguments) {
alert ("Error");