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!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - XFA Field Check Box
  FAQ FAQ  Forum Search   Register Register  Login Login

XFA Field Check Box

 Post Reply Post Reply
Author
Message
mdgodfrey View Drop Down
Team Player
Team Player


Joined: 09 Jul 13
Location: Utah
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdgodfrey Quote  Post ReplyReply Direct Link To This Post Topic: XFA Field Check Box
    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
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 02 Nov 17 at 10:42PM
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

Back to Top
mdgodfrey View Drop Down
Team Player
Team Player


Joined: 09 Jul 13
Location: Utah
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdgodfrey Quote  Post ReplyReply Direct Link To This Post Posted: 03 Nov 17 at 5:25PM
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
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 03 Nov 17 at 6:15PM
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

Back to Top
mdgodfrey View Drop Down
Team Player
Team Player


Joined: 09 Jul 13
Location: Utah
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdgodfrey Quote  Post ReplyReply Direct Link To This Post Posted: 03 Nov 17 at 9:55PM
This works fine with text fields but I can't get either method to work with a check box.
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 05 Nov 17 at 8:07PM
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

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store