2

I'm developing a SharePoint 2010 Foundation Farm Solution. I've created a Document Library (Attachments) with 3 custom field (A,B,C).

I open a pop-up like image below with this code:

function openDialog() {
    var options = SP.UI.$create_DialogOptions();
    options.resizable = 1;
    options.scroll = 1;
    options.url = "http://site/Lists/MyList/Forms/Upload.aspx";
    options.dialogReturnValueCallback = Function.createDelegate(null, function () { });
    SP.UI.ModalDialog.showModalDialog(options);
}

Upload attachment pop-up

After upload I would pass value parameter (Can I perform this by JavaScript?) and disable modify feature.

Meta-data of attachment

How can I develop this feature?

P.S.: I know value of A B C yet in openDialog() method.

Thanks for your support.

3
  • do you mean that the value C is not known beforehand? Can you provide some more detail about the value source? It is calculated? how?
    – SPArcheon
    Jan 9, 2015 at 12:07
  • Hi. I know the value of A B C yet in openDialog() method.
    – ilMattion
    Jan 9, 2015 at 12:11
  • Yes you can perform that by JavaScript
    – AymKdn
    Jan 10, 2015 at 9:55

1 Answer 1

1

The dialog used for entering metadata is called EditForm. What you can do is, pass the parameter values as a query string to that form.

Then use JavaScript to read the query string values and populate the fields.

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.