Check Radiobutton on PDF

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF CoreSuite for .NET (v5)  /  Check Radiobutton on PDF

DynamicPDF CoreSuite for .NET (v5) Forum

 Jan 22 2009 7:50 PM
Hi,

I am doing a form fill (populating PDF fields from web form). I have problem with radio buttons and checboxes, they are never checked in the PDF form.  I use syntax similar to this

pdfdoc.form.fields(FullName).Value = "radiobuttonvalue".

Please help me with this.

Thanks
 Jan 23 2009 4:05 AM
Posted by a ceTe Software moderator
Hello,

In order to check the check box or radio buttons you will have to use the correct export value of the radio button or check box. Please make sure that you are using the correct export values for checking them. If you are still having problem then please send over the PDF and the code you are using to our Support Team so that they can look into it further.

Thanks,
ceTe Software Support Team.
 Jan 23 2009 7:35 AM
Thanks for reponse. But how do I set the export value for a radio button in .Net?

Thanks!
 Jan 23 2009 8:01 AM
Posted by a ceTe Software moderator
Hello,

The export value will be set by the one who has created the check box and radio buttons. You should know this export value to check the check box. You can also know the export values of existing fields using the Acrobat Professional.

If you are creating the check box then you can set the export value using the ExportValue property of the check box or radio button object.

    CheckBox cbY = new CheckBox("cb", 10, 10, 20, 20);
    cbY.ExportValue = "Y";

In order to check the above check box you will have to use the "Y".

    document.Form.Fields["cb"].Value = "Y";

Thanks,
ceTe Software Support Team.
 Jan 23 2009 8:31 AM
I am using radiobutton list for Male, Female options.

 <asp:RadioButtonList ID="gender" runat="server">
    <asp:ListItem Value="Male">Male</asp:ListItem>
    <asp:ListItem Value="Female">Female</asp:ListItem>
 </asp:RadioButtonList>

Where do I set the value here?

Thanks!
 Jan 23 2009 9:00 AM
Posted by a ceTe Software moderator
Hello,

The RadioButtonList you are using belongs to the .NET controls. This is not related to our product. You can not set ExportValue to this radio button list. ExportValue is a property of the RadioButton class of our product DynamicPDF Generator.

In order to select the .NET radio buttons you will have to use the Selected property of the radio button item to true.

   //This selects the Male option
   gender.Items[0].Selected = true;

You can refer to the RadioButton class of our product on our help documentation.

Thanks,
ceTe Software Support Team.
 Sep 19 2011 4:59 PM
Hi everyone knows how we get checkbox check/uncheck property while getting fillable fields please?
 Sep 20 2011 4:29 AM
Posted by a ceTe Software moderator
Hello,

The DynamicPDF Merger API will return form field value as string. If the checkbox field is checked in the input PDF then it returns export value of the checkbox as string. If the check box is not checked then it returns an empty string. You can have a check for empty string in your code to know whether the checkbox is checked or not.

Thanks,
ceTe Software Support Team.

All times are US Eastern Standard time. The time now is 12:47 AM.