2

I have a InfoPath 2010 form. Somehow my user-profile people picker tabs back to the previous field when I first step into it. Once I tab back in there is no longer a problem. Does anyone know how to fix this?

I tried making all the fields around it render only when the browser changes but that does not help. I also tried adding the URL of the site with no success.

Thanks in advance.

Sara

1
  • I guess this bug will never be fixed in SP2010. After more than three years time nothing has changed. Strange is that such a little amount of people report this issue. To me this seems that InfoPath Forms Services is not really used at all.
    – user16644
    Apr 26, 2013 at 12:11

2 Answers 2

4

Update: Short answer is the issue is fixed in SharePoint 2013. I haven't verified this yet.

Long answer is it's recorded as MS internal bug: "Office14 459444 - MOSS-IP : Partner Controls are not hooked up to IPFS selection model/service infrastructure"

Issue details:

RESULTS: tabbing away [from people picker] causes a postback (expected) but when the page reloads the focus is reset to the top of the form, so we can never tab to the button EXPECTED: after the postback, the tab focus should return to the next item in line (i.e. the Resolve icon of the people picker, then the Browse icon, then the Button)


Update: It seems any post-back on the form will cause the people picker to go into auto-resolve mode and cause the tab-back problem. For example, we have some cascading-drop-down lists and when we re-query for the dependent drop-down, the non-required people pickers start to exhibit the problem.


Update: Problem is also reported here.


Update: I posted an update here. Basically nothing new from MS. Our current workaround is to "de-require" the people picker and then use a "fake" single line of text field to simulate the required behaviour. We can also a section to show hide a red required asterisk based on the presence of the value.


Update: We've logged this as a bug with Microsoft. It seems to happen if you have a required People Picker on the page. They confirmed the bug - but they're doing further investigation atm. I hope to get answer soon.


For us, this is caused by a full page post-back. We are using a SharePoint 2010 in the old SharePoint 2007 Visual Styles (v3), and so the AJAX Update Panel isn't present in the Master Page (hence the full page post-back).

Explicitly setting the tab order didn't work.

We are now investigating upgrading this site to use the v4 UIVersion/master page styles.

Interestingly in the old styles, the control attempts to resolve the user after you tab out of the people-picker, however in the new version, it doesn't seem to resolve the user until you click the resolve button or hit save. Seems it'd be nice to have that option.

0

I worked out all the data was on the page so if you run this js it will populate the people picker

$("div[title$='People Picker'][id*='FormControl_FormControl']:visible").each(function(){
                                id = $(this).attr('id').substring(13,$(this).attr('id').length);
                                $("div[id$="+id+"]").eq(0).append($("div[id$="+id+"]").eq(1).find('#divEntityData').parent());
                            });

It basically looks for all empty people pickers and populates it with the HTML data that is already on the page.

I then found the native method for initializing the post back WebForm_InitCallback(). So what I did was in formserver.aspx add in to a script tag the following method that overrides the native function, does all the same stuff bux executes my fix after

function WebForm_InitCallback() {
            var formElements = theForm.elements,
                count = formElements.length,
                element;
            for (var i = 0; i < count; i++) {
                element = formElements[i];
                var tagName = element.tagName.toLowerCase();
                if (tagName == "input") {
                    var type = element.type;
                    if ((__callbackTextTypes.test(type) || ((type == "checkbox" || type == "radio") && element.checked))
                        && (element.id != "__EVENTVALIDATION")) {
                        WebForm_InitCallbackAddField(element.name, element.value);
                    }
                }
                else if (tagName == "select") {
                    var selectCount = element.options.length;
                    for (var j = 0; j < selectCount; j++) {
                        var selectChild = element.options[j];
                        if (selectChild.selected == true) {
                            WebForm_InitCallbackAddField(element.name, element.value);
                        }
                    }
                }
                else if (tagName == "textarea") {
                    WebForm_InitCallbackAddField(element.name, element.value);
                }
            }
            //Function Modification
            setTimeout(function(){
                loadTimer = window.setInterval(function(){
                    if($('#FormControl__DialogContainer').is(":visible")){
                        //console.log("loadding3");
                    }else{
                        clearInterval(loadTimer);
                        setTimeout(function(){
                            $("div[title$='People Picker'][id*='FormControl_FormControl']:visible").each(function(){
                                id = $(this).attr('id').substring(13,$(this).attr('id').length);
                                $("div[id$="+id+"]").eq(0).append($("div[id$="+id+"]").eq(1).find('#divEntityData').parent());
                            });
                            $("div[title$='People Picker'][id*='FormControl_FormControl']:visible").children().append('; ');
                            $("div[title$='People Picker'][id*='FormControl_FormControl']:visible").css("height", "auto");                              
                        }, 500);                                                
                    }
                },200);
            }, 200);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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