Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!
XFA Field Check Box |
Post Reply |
Author | |
mdgodfrey
Team Player Joined: 09 Jul 13 Location: Utah Status: Offline Points: 23 |
Post Options
Thanks(0)
Posted: 02 Nov 17 at 9:30PM |
I can populate fields in a XFA document as long as it it a text field.
I don't see anyway to check a field that is a Check Box however. Does anyone know how to do that? Thanks
|
|
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(0)
|
Hi,
perhaps this guide from the online reference will be a help? http://www.debenu.com/kb/programmatically-extract-form-field-data-pdf-files/ |
|
Cheers,
Ingo |
|
mdgodfrey
Team Player Joined: 09 Jul 13 Location: Utah Status: Offline Points: 23 |
Post Options
Thanks(0)
|
I appreciate the reference. I have been able to extract data from a form and mostly can place data into a form. This guide does give me a few more options I hadn't considered so thanks.
The exception for me at the moment is a CheckBox. I can see how to alter the format of the check but so far can only place a check by manually doing that in the form. In reading the data from a CheckBox when it is unchecked the field value is 'Off'. So one might think that placing 'On' into the checkbox would activate the check mark. This does not work for me however. I am attempting to place that data with this code: PDF.SetXFAFormFieldValue('Form1099-S/c1_3', 'On'); //Does not produce the check mark Doing something similar works just fine it the field is a text box but not when its a check box. Thanks again
|
|
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(0)
|
Hi,
fpr normal forms (not XFA) it works like this: // ... QP.SetNeedAppearances(1); QP.SetFormFieldValueByTitle( FieldName, FieldValue ); nresult := QP.FindFormFieldByTitle(FieldName); QP.UpdateAppearanceStream(nresult); // ... And you're right a value "On" oder "Off" will change the checkbox and regarding XFA it should work similar ...? BTW: Is your fieldname correct with the slash in it? Edited by Ingo - 03 Nov 17 at 6:16PM |
|
Cheers,
Ingo |
|
mdgodfrey
Team Player Joined: 09 Jul 13 Location: Utah Status: Offline Points: 23 |
Post Options
Thanks(0)
|
This works fine with text fields but I can't get either method to work with a check box.
|
|
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(0)
|
for me it works fine ;-)
Perhaps it would help if you're able to post more than only one single line of code... |
|
Cheers,
Ingo |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store