-1

I am working with SharePoint 2010 form library.

I have a drop down column which is dependent on text input column value .

The value in the Text input column comes from the infopath form.

What i want is :-

Suppose the text column value is "AU" then disable the Drop down column otherwise enable it.

I want to code this in Sharepoint Form library Edit page(Editpage.aspx).

I think it would be possible with Jquery.

Any help/suggestion would be highly appreciated.

Regards

Kishan

2 Answers 2

1

I have solved this problem:

Below is the source of the Javascript attach it with code.

src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"

write this all code in the javasrcipt tag

$(document).ready(function() {    
    // add change handler 
    $("input[title='Test Value']").change(function()     
    { 
        MasterSelectChange();     
    }); 

    // call the change function to set up form for first display: 
    MasterSelectChange();     
});

function MasterSelectChange()    
{    
    var thisVal =  $("input[title='Test Value']").val();      
    if(thisVal == "AU")     
    {     
        $("select[title='Test_Status']").closest("tr").hide
    } 
    else 
    { 
       $("select[title='Test_Status']").show();      
    }     
}
0

Actually, I guess, you don't need to use JQuery for this. You can disable dropdown using InfoPath too. Just use rules on InfoPath. And you can hide the whole row like this:

$('#>id<').parents().parents().parents().parents().eq(0).hide();

You must reach the parent.

1
  • Thanks @compengTR for your reply: But this Test_Satus column is the lookup column. & this Test Value column is the infopath form(Check box) value. So how can we edit this lookup column from infopath form. Any Suggestion would be appreciated.
    – Kishan
    Commented May 11, 2012 at 11:15

Your Answer

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

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