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 - Setting RadioButton values
  FAQ FAQ  Forum Search   Register Register  Login Login

Setting RadioButton values

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


Joined: 19 May 21
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote chris_adsi Quote  Post ReplyReply Direct Link To This Post 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
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