1- < h4 > 30. Applying a brand to an envelope using a template</ a > </ h4 >
1+ < h4 > 30. Applying a brand to an envelope using a template</ h4 >
22
3- < p >
4- This code example demonstrates how to apply a brand to a template
5- </ p >
3+ <% if @template_ok %>
4+ < p >
5+ This code example demonstrates how to apply a brand to a template
6+ </ p >
7+ <% end %>
68
79< p > API method used:
810 < a target ='_blank ' href ="https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/envelopes/create/ "> Envelopes::create</ a > .
1214 View source file < a target ="_blank " href ="<%= @source_url %> "> <%= @source_file %> </ a > on GitHub.
1315</ p >
1416
15- < form class ="eg " action ="" method ="post " data-busy ="form ">
16- < div class ="form-group ">
17- < label for ="signerEmail "> Signer Email</ label >
18- < input type ="email " class ="form-control " id ="signerEmail " name ="signerEmail "
19- aria-describedby ="emailHelp " placeholder ="pat@example.com " required
20- value ="<%= @config . signer_email %> ">
21- < small id ="emailHelp " class ="form-text text-muted "> We'll never share your email with anyone else.</ small >
22- </ div >
23- < div class ="form-group ">
24- < label for ="signerName "> Signer Name</ label >
25- < input type ="text " class ="form-control " id ="signerName " placeholder ="Pat Johnson " name ="signerName "
26- value ="<%= @config . signer_name %> " required >
27- </ div >
28- < div class ="form-group ">
29- < label for ="ccEmail "> CC Email</ label >
30- < input type ="email " class ="form-control " id ="ccEmail " name ="ccEmail "
31- aria-describedby ="emailHelp " placeholder ="pat@example.com " required >
32- < small id ="emailHelp " class ="form-text text-muted "> The email for the cc recipient must be different from the signer's email.</ small >
33- </ div >
34- < div class ="form-group ">
35- < label for ="ccName "> CC Name</ label >
36- < input type ="text " class ="form-control " id ="ccName " placeholder ="Pat Johnson " name ="ccName "
37- required >
38- </ div >
39- < div class ="form-group ">
40- < label for ="templates "> Envelope template</ label >
41- < select id ="templates " name ="templates " class ="form-control ">
42- <% @templates . each do |t | %>
43- < option value ="<%= t . template_id %> " selected > <%= t . name %> </ option >
44- <% end %>
45- </ select >
46- </ div >
47- < div class ="form-group ">
48- < label for ="brands "> Brand</ label >
49- < select id ="brands " name ="brands " class ="form-control ">
50- <% @brand_names . each do |b | %>
51- < option value ="<%= b . brand_id %> " selected > <%= b . brand_name %> </ option >
52- <% end %>
53- </ select >
54- </ div >
55- < button type ="submit " class ="btn btn-docu "> Submit</ button >
56- </ form >
17+ <% if @template_ok %>
18+ < form class ="eg " action ="" method ="post " data-busy ="form ">
19+ < div class ="form-group ">
20+ < label for ="signerEmail "> Signer Email</ label >
21+ < input type ="email " class ="form-control " id ="signerEmail " name ="signerEmail "
22+ aria-describedby ="emailHelp " placeholder ="pat@example.com " required
23+ value ="<%= @config . signer_email %> ">
24+ < small id ="emailHelp " class ="form-text text-muted "> We'll never share your email with anyone else.</ small >
25+ </ div >
26+ < div class ="form-group ">
27+ < label for ="signerName "> Signer Name</ label >
28+ < input type ="text " class ="form-control " id ="signerName " placeholder ="Pat Johnson " name ="signerName "
29+ value ="<%= @config . signer_name %> " required >
30+ </ div >
31+ < div class ="form-group ">
32+ < label for ="ccEmail "> CC Email</ label >
33+ < input type ="email " class ="form-control " id ="ccEmail " name ="ccEmail "
34+ aria-describedby ="emailHelp " placeholder ="pat@example.com " required >
35+ < small id ="emailHelp " class ="form-text text-muted "> The email for the cc recipient must be different from the signer's email.</ small >
36+ </ div >
37+ < div class ="form-group ">
38+ < label for ="ccName "> CC Name</ label >
39+ < input type ="text " class ="form-control " id ="ccName " placeholder ="Pat Johnson " name ="ccName "
40+ required >
41+ </ div >
42+ < div class ="form-group ">
43+ < label for ="brands "> Brand</ label >
44+ < select id ="brands " name ="brands " class ="form-control ">
45+ <% @brand_names . each do |b | %>
46+ < option value ="<%= b . brand_id %> " selected > <%= b . brand_name %> </ option >
47+ <% end %>
48+ </ select >
49+ </ div >
50+ < button type ="submit " class ="btn btn-docu "> Submit</ button >
51+ </ form >
52+
53+ <% else %>
54+ < p > Problem: please first create the template using < a href ="eg008 "> example 8.</ a > < br />
55+ Thank you.</ p >
56+
57+ < form class ="eg " action ="eg008 " method ="get ">
58+ < button type ="submit " class ="btn btn-docu "> Continue</ button >
59+ </ form >
60+ <% end %>
0 commit comments