File tree Expand file tree Collapse file tree 1 file changed +22
-1
lines changed
Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change 88 TextField,
99 PasswordField,
1010 RadioButton,
11- Appearance
11+ Appearance,
12+ TextFieldParent
1213} = jsPDF . AcroForm ;
1314
1415doc . setFontSize ( 12 ) ;
@@ -22,6 +23,7 @@ addPushButton();
2223addTextField ( ) ;
2324addPasswordField ( ) ;
2425addRadioGroups ( ) ;
26+ addTextFieldGroup ( ) ;
2527
2628function addComboBox ( ) {
2729 doc . text ( "ComboBox:" , 10 , yPos ) ;
@@ -143,4 +145,23 @@ function addRadioGroups() {
143145 radioButton23 . AS = "/RadioGroup2Option3" ;
144146
145147 radioGroup2 . setAppearance ( Appearance . RadioButton . Circle ) ;
148+ yPos += margin + boxDim ;
149+ }
150+
151+ function addTextFieldGroup ( ) {
152+ doc . text ( "TextField Group:" , 10 , yPos ) ;
153+
154+ const txtDate = new TextFieldParent ( ) ;
155+ txtDate . fieldName = "Date" ;
156+ txtDate . value = new Date ( ) . toLocaleDateString ( "en-US" ) ;
157+ txtDate . borderColor = [ 0 ] ;
158+ doc . addField ( txtDate ) ;
159+
160+ const txtDate1 = txtDate . createChild ( ) ;
161+ txtDate1 . Rect = [ 50 , yPos - 5 , 40 , 10 ] ;
162+
163+ yPos += margin ;
164+
165+ const txtDate2 = txtDate . createChild ( ) ;
166+ txtDate2 . Rect = [ 50 , yPos - 5 , 40 , 10 ] ;
146167}
You can’t perform that action at this time.
0 commit comments