Skip to content

Commit c549abe

Browse files
add formula tabs
1 parent cd10e34 commit c549abe

File tree

1 file changed

+63
-2
lines changed

1 file changed

+63
-2
lines changed

launcher-csharp/eSignature/Examples/ResponsiveSigning.cs

Lines changed: 63 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,66 @@ private static EnvelopeDefinition MakeEnvelope(
7575
string ccName,
7676
string signerClientId)
7777
{
78+
int price1 = 5;
79+
int price2 = 150;
80+
81+
FormulaTab formulaTab1 = new FormulaTab
82+
{
83+
Font = "helvetica",
84+
FontSize = "size11",
85+
FontColor = "black",
86+
AnchorString = "/l1e/",
87+
AnchorYOffset = "-8",
88+
AnchorUnits = "pixels",
89+
AnchorXOffset = "105",
90+
TabLabel = "l1e",
91+
Formula = $"[l1q] * {price1}",
92+
RoundDecimalPlaces = "0",
93+
Required = "true",
94+
Locked = "true",
95+
DisableAutoSize = "false",
96+
};
97+
98+
FormulaTab formulaTab2 = new FormulaTab
99+
{
100+
Font = "helvetica",
101+
FontSize = "size11",
102+
FontColor = "black",
103+
AnchorString = "/l2e/",
104+
AnchorYOffset = "-8",
105+
AnchorUnits = "pixels",
106+
AnchorXOffset = "105",
107+
TabLabel = "l2e",
108+
Formula = $"[l2q] * {price2}",
109+
RoundDecimalPlaces = "0",
110+
Required = "true",
111+
Locked = "true",
112+
DisableAutoSize = "false",
113+
};
114+
115+
FormulaTab formulaTab3 = new FormulaTab
116+
{
117+
Font = "helvetica",
118+
FontSize = "size11",
119+
FontColor = "black",
120+
AnchorString = "/l3t/",
121+
AnchorYOffset = "-8",
122+
AnchorUnits = "pixels",
123+
AnchorXOffset = "105",
124+
TabLabel = "l3t",
125+
Formula = "[l1e] + [l2e]",
126+
RoundDecimalPlaces = "0",
127+
Required = "true",
128+
Locked = "true",
129+
DisableAutoSize = "false",
130+
Bold = "true",
131+
};
132+
133+
Tabs tabs = new Tabs
134+
{
135+
FormulaTabs = new List<FormulaTab> { formulaTab1, formulaTab2, formulaTab3 },
136+
};
137+
78138
Signer signer = new Signer
79139
{
80140
Email = signerEmail,
@@ -83,6 +143,7 @@ private static EnvelopeDefinition MakeEnvelope(
83143
RecipientId = "1",
84144
RoutingOrder = "1",
85145
RoleName = "Signer",
146+
Tabs = tabs,
86147
};
87148

88149
CarbonCopy cc = new CarbonCopy
@@ -100,8 +161,8 @@ private static EnvelopeDefinition MakeEnvelope(
100161
.Replace("{ccName}", ccName)
101162
.Replace("{ccEmail}", ccEmail)
102163
.Replace("/sn1/", "<ds-signature data-ds-role=\"Signer\"/>")
103-
.Replace("/l1q/", " <input data-ds-type=\"number\"/>")
104-
.Replace("/l2q/", " <input data-ds-type=\"number\"/>");
164+
.Replace("/l1q/", " <input data-ds-type=\"number\" name=\"l1q\"/>")
165+
.Replace("/l2q/", " <input data-ds-type=\"number\" name=\"l2q\"/>");
105166

106167
return new EnvelopeDefinition()
107168
{

0 commit comments

Comments
 (0)