List radio button export values

Posted by: scottev on 27 April 2023, 5:00 am EST

  • Posted 27 April 2023, 5:00 am EST

    I would like to list all the possible export values for radio buttons on a form. I can do it for some of the radio buttons on the enclosed form. The radio group RadioChoice1AndChoice2 has values are “Choice1” and “Choice2” but I cannot find the values widget.name like I can for “radiogroup1”. Also radiogropu2 is an issue.

    What is the best way to list the radio buttons export values?

    All Field Types.zip

  • Posted 27 April 2023, 11:29 pm EST

    Hello,

    Thank you for reporting this issue. We too can observe the issue and escalate this to the development team for investigation. We will let you know as soon as we get any update on this from their end.

    [Internal Tracking ID: DOC-5391]

    Regards,

    Prabhat Sharma

  • Posted 2 May 2023, 9:02 pm EST

    Hello,

    As per the developers, the widgets in this pdf do not have a Name property.

    To get the export value you can use the following code:

    string exportValue1 = (doc.AcroForm.Fields[10] as RadioButtonField).GetCheckedAppearanceStreamName(doc.AcroForm.Fields[10].Widgets[0]);
    string exportValue2 = (doc.AcroForm.Fields[10] as RadioButtonField).GetCheckedAppearanceStreamName(doc.AcroForm.Fields[10].Widgets[1]); 
    Console.WriteLine(exportValue1);
    Console.WriteLine(exportValue2);

    The last radio button, the ‘RadioChoice1AndChoice2’ shown by the viewer is the name of the radio button field. Both widgets associated with that field do not have any names, so null is correctly returned.

    The ‘Export Value’ in the viewer’s UI should more correctly be called ‘Choice value’, again we will change the label in the next hotfix. This is what the value of the field would be when the corresponding widget is clicked. Either way, it is not the name of the widget. What the viewer shows is correct.

    Regards,

    Prabhat Sharma.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels