SharePointCommunity
Die deutschsprachige Community für SharePoint, Office 365 und mit Azure

Custom newfrom (upload a picture and fill in the picture url)

bewertet von 0 Usern
Nicht beantwortet Dieser Beitrag hat 0 Geprüfte Antworten | 1 Antwort | 1 Follower

Top-150-Beitragsschreiber
107 Beiträge
Texas3110 erstellt in 11 Sep 2013 17:54

I have to customize an announcement list new and edit form.

In the form is there is a Picture Colum. But I don’t want the user to go first to a picture library, upload the picture, copy the picture url and fill in the url in the announcement list form.

In the Internet I found this helping jScript (http://spimagefieldupload.codeplex.com/).

//If the link is clicked, show the existing RteUploadDialog.aspx page as a popup
           
var dialog = {
                url
: SP.Utilities.Utility.getLayoutsPageUrl("RteUploadDialog.aspx") + "?LCID=" + SP.Res.lcid + "&Dialog=UploadImage&UseDivDialog=true&Source=" + encodeURIComponent(window.location),
                allowMaximize
: true,
                showClose
: true,
                width
: 500,
                height
: 160,
                dialogReturnValueCallback
: function (success, html) {
                   
if (success) {
                       
//Gets the picture's url from the popup, shows it and hides the links
                       
var $emptyPanel = jQuery("#" + selectorId + "_EmptyPanel");
                       
var $assetSelectedPanel = jQuery("#" + selectorId + "_AssetSelectedPanel");
                       
var $imageFieldDisplay = jQuery("#" + selectorId + "_ImageFieldDisplay");
                        $imageFieldDisplay
.html(html);
                        $emptyPanel
.css("display", "none");
                        $assetSelectedPanel
.css("display", "inline");
                   
}
               
}
           
};
            thisDialog
= SP.UI.ModalDialog.showModalDialog(dialog);

But how i can change the script (dialogReturnValueCallback: function) so that the picture url and the picture name is stored in jScript Variables in the form. So I can write I back in the form fileds.

 

Thanks for your help 

Alle Antworten

Top-50-Beitragsschreiber
242 Beiträge

without having tried I'd say that you've got to go this way:

http://www.ilikesharepoint.de/2013/01/sharepoint-2010-passing-parameter-values-into-listitem-forms/

as far it concerns the interacting with the variables

Seite 1 von 1 (2 Elemente) | RSS