@@ -45,10 +45,8 @@ public static string SendEnvelopeUsingEmbeddedSending(string signerEmail, string
4545 // Step 3. create the sender view
4646 // Call the CreateSenderView API
4747 // Exceptions will be caught by the calling function
48- ReturnUrlRequest viewRequest = new ReturnUrlRequest
49- {
50- ReturnUrl = returnUrl ,
51- } ;
48+ EnvelopeViewRequest viewRequest = PrepareViewRequest ( startingView , returnUrl ) ;
49+
5250 ViewUrl result1 = envelopesApi . CreateSenderView ( accountId , envelopeId , viewRequest ) ;
5351
5452 // Switch to Recipient and Documents view if requested by the user
@@ -64,6 +62,48 @@ public static string SendEnvelopeUsingEmbeddedSending(string signerEmail, string
6462 return redirectUrl ;
6563 }
6664
65+ private static EnvelopeViewRequest PrepareViewRequest ( string startingView , string returnUrl )
66+ {
67+ EnvelopeViewSettings viewSettings = new EnvelopeViewSettings
68+ {
69+ StartingScreen = startingView ,
70+ SendButtonAction = "send" ,
71+ ShowBackButton = "false" ,
72+ BackButtonAction = "previousPage" ,
73+ ShowHeaderActions = "false" ,
74+ ShowDiscardAction = "false" ,
75+ LockToken = string . Empty ,
76+ RecipientSettings = new EnvelopeViewRecipientSettings
77+ {
78+ ShowEditRecipients = "false" ,
79+ ShowContactsList = "false" ,
80+ } ,
81+ DocumentSettings = new EnvelopeViewDocumentSettings
82+ {
83+ ShowEditDocuments = "false" ,
84+ ShowEditDocumentVisibility = "false" ,
85+ ShowEditPages = "false" ,
86+ } ,
87+ TaggerSettings = new EnvelopeViewTaggerSettings
88+ {
89+ PaletteSections = "default" ,
90+ PaletteDefault = "custom" ,
91+ } ,
92+ TemplateSettings = new EnvelopeViewTemplateSettings
93+ {
94+ ShowMatchingTemplatesPrompt = "true" ,
95+ } ,
96+ } ;
97+
98+ EnvelopeViewRequest viewRequest = new EnvelopeViewRequest
99+ {
100+ ReturnUrl = returnUrl ,
101+ ViewAccess = "envelope" ,
102+ Settings = viewSettings ,
103+ } ;
104+ return viewRequest ;
105+ }
106+
67107 //ds-snippet-start:eSign11Step2
68108 private static EnvelopeDefinition MakeEnvelope ( string signerEmail , string signerName , string ccEmail , string ccName , string docDocx , string docPdf , string envStatus )
69109 {
0 commit comments