Hi all,
I need to know the type of a field: (Text, Radio button, Combo Box, Check box).
as well for Combo Box and Check box I would like to get the options or labels
Thanks
JR
How to get the type for the fields in a PDF Form?
Re: How to get the type for the fields in a PDF Form?
Support · Dec 19, 2005Hello JR,
Look at the FormFieldReader example that is downloaded with the product download. It shows how to retrieve the type of form fields on the PDF. Radio button, Push button and check box are types of PdfButtonField. To distinguish between them, you would need to use ForlmFieldFlags.
Below is the code snippet:
if(pdfFormField is PdfButtonField)
{
if((pdfFormField.Flags & FormFieldFlags.Radio) ==
FormFieldFlags.Radio)
return "Radio Button Field";
else{
if((pdfFormField.Flags & FormFieldFlags.PushButton) ==
FormFieldFlags. PushButton)
return "Push Button Field";
else
return "Check Box Field";
}
}
Thanks,
ceTe Software Support Team