Skip to content

Commit da168f8

Browse files
committed
DEVDOCS-9566, mixing it together with DEVDOCS-9594 as both are numerical tabs
1 parent 8034c07 commit da168f8

File tree

1 file changed

+20
-13
lines changed

1 file changed

+20
-13
lines changed

launcher-csharp/eSignature/Examples/SetEnvelopeTabValue.cs

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -83,22 +83,28 @@ public static (string, string) CreateEnvelopeAndUpdateTabData(
8383
// and as a pure number in a custom field ('salary') in the envelope
8484
int salary = 123000;
8585

86-
Text textSalary = new Text
86+
Numerical numericalSalary = new Numerical
8787
{
88-
AnchorString = "/salary/",
89-
AnchorUnits = "pixels",
90-
AnchorYOffset = "-9",
91-
AnchorXOffset = "5",
92-
Font = "helvetica",
93-
FontSize = "size11",
94-
Bold = "true",
95-
Locked = "true",
96-
97-
// Convert number to String: 'C2' sets the string
98-
// to currency format with two decimal places
88+
ValidationType = "Currency",
89+
XPosition = "50",
90+
YPosition = "50",
91+
Height = "20",
92+
Width = "70",
93+
PageNumber = "1",
94+
DocumentId = "1",
95+
MinNumericalValue = "0",
96+
MaxNumericalValue = "1000000",
9997
Value = salary.ToString("C2"),
10098
TabId = "salary",
10199
TabLabel = "Salary",
100+
NumericalValue = salary.ToString(),
101+
LocalePolicy = new LocalePolicyTab
102+
{
103+
CultureName = "en-US",
104+
CurrencyCode = "usd", CurrencyPositiveFormat = "csym_1_comma_234_comma_567_period_89",
105+
CurrencyNegativeFormat = "minus_csym_1_comma_234_comma_567_period_89",
106+
UseLongCurrencyFormat = "true"
107+
},
102108
};
103109

104110
TextCustomField salaryCustomField = new TextCustomField
@@ -131,7 +137,8 @@ public static (string, string) CreateEnvelopeAndUpdateTabData(
131137
Tabs signer1Tabs = new Tabs
132138
{
133139
SignHereTabs = new List<SignHere> { signHere },
134-
TextTabs = new List<Text> { textLegal, textFamiliar, textSalary },
140+
TextTabs = new List<Text> { textLegal, textFamiliar },
141+
NumericalTabs = new List<Numerical> { numericalSalary },
135142
};
136143
signer1.Tabs = signer1Tabs;
137144
Recipients recipients = new Recipients

0 commit comments

Comments
 (0)