Search Persits Software Knowledge Base

 

Article PS22022559191

Radio buttons on PDF forms do not show up on iOS

Problem Description

After filling an interactive PDF form with AspPDF's SetFieldValue and SetFieldValueEx methods, radio button fields appear blank when the form is viewed on iOS devices such as iPads and iPhones. The same form is displayed properly on Windows and Android.

Solution

To select a radio button by the name of "RadioField", two lines of codes are normally needed: a call to FindField followed by a call to SetFieldValueEx on one of the radio button's child fields. This is sufficient when the form is viewed on Windows or Android. However, for the radio button fields to be viewed properly on iOS as well, another line of code is needed, a call to SetFieldValueEx on the parent radio field itself, as shown below in blue:

idx = 1 ' 1-based index of the radio button to select
Set field = Doc.Form.FindField("RadioField")
field.Children(idx).SetFieldValueEx _
   field.Children(idx).FieldOnValue

field.SetFieldValueEx field.Children(idx).FieldOnValue

Created: 2/25/2022 1:57:15 PM
Last Modified: 2/25/2022 2:33:14 PM

Copyright © Persits Software, Inc. 1998 - 2022
For technical support, write to support@persits.com.