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!
|  | 
| Setting RadioButton values | 
| Post Reply   | 
| Author | |
| chris_adsi   Team Player   Joined: 19 May 21 Status: Offline Points: 23 |  Post Options  Thanks(0)  Quote  Reply  Topic: Setting RadioButton values Posted: 19 May 21 at 12:10PM | 
| We have a PDF with form fields from one of our suppliers that we need to fill in, and some of those fields are radio buttons. Checkboxes seem fine, but RadioButtons we are struggling with. They have a few groups for title (Mr,Mrs etc) and I can't get them ticks to show, even though my code returns a success for the SetFormFieldValue call. Searching it seems I need to set the value of the field to the name of the appropriate SubName which I have tried, and which returns a 1 for SetFormFieldValue, but the boxes are never ticked on the resulting output document. This is my code (VBA) - varValue is set to the same value as I get back from one of the GetFormFieldSubName calls so I am for instance setting the value to "2" to try and select one of the options :                         'fill in a form field                         Case RenderType.FormField                             Select Case fld.FieldType                                 Case FieldType.CheckBox, FieldType.Radiobutton                                     intSubCount = objPDF.GetFormFieldSubCount(lngField)                                     For intSub = 1 To intSubCount                                         strSubName = objPDF.GetFormFieldSubName(lngField, intSub)                                         If strSubName <> "Off" Then                                             lngSub = objPDF.GetFormFieldKidTempIndex(lngField, intSub)                                             If strSubName = varValue Then                                                 lngRes = objPDF.SetFormFieldValue(lngField, strSubName)                                             End If                                         End If                                     Next                                 Case Else                                     lngRes = objPDF.SetFormFieldValue(lngField, varValue)                             End Select Many Thanks Edited by chris_adsi - 19 May 21 at 3:24PM | |
|  | |
| 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