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 - RadioButton. How?
  FAQ FAQ  Forum Search   Register Register  Login Login

RadioButton. How?

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


Joined: 01 Mar 07
Status: Offline
Points: 30
Post Options Post Options   Thanks (0) Thanks(0)   Quote vizacc Quote  Post ReplyReply Direct Link To This Post Topic: RadioButton. How?
    Posted: 11 Jul 11 at 11:25AM
I searched around -->

Here's a kb-article from Rowan how to read values from radiobuttons:
http://help.quickpdflibrary.com/questions/350/get-data-from-radio-button-form-fields
Try the knowledgebase of QuickPDF searching with "choice" and "radio button":
http://help.quickpdflibrary.com/

Site *http://help.quickpdflibrary.com/* not working. Can someone please post an example?


Back to Top
Rowan View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 10 Jan 09
Status: Offline
Points: 398
Post Options Post Options   Thanks (0) Thanks(0)   Quote Rowan Quote  Post ReplyReply Direct Link To This Post Posted: 11 Jul 11 at 12:30PM
Here is the answer you are looking for:


Radio buttons that use the same title are considered to be part of a radio button group. Each radio button that belongs to the group is a child or sub-radio button.

This means that you can use the GetFormFieldTitle and GetFormFieldValue functions to find out the title and selected value of a radio button group.

So for example, if you have a radio button group which has the title Nationality and this group has sub-radio buttons with the export values of AustralianFrenchGermanAmerican and Chinese, but the Australian sub-radio button is the radio button which is selected in the PDF form, then the GetFormFieldValue function will return a value of Australian for the Nationality radio button group.

The code for this would look something like the below:

// Loop through all of the form fields in the PDF
for i := 1 to QP.FormFieldCount do
begin
   
// Only process radio buttons
   
if QP.GetFormFieldType(i) = 4 then
   
begin
       
// Get radio button group title and selected value
       
WriteLn(IntToStr(i) + '. Group');
       
WriteLn;
       
WriteLn('Radio Button Group: ' + QP.GetFormFieldTitle(i));
       
WriteLn('Selected Radio Button Value: ' + QP.GetFormFieldValue(i));
       
Writeln;
   
end;
   
ReadLn;
end;

If you wanted to get the radio button group title, selected value and a full list of all the sub-radio buttons that belong to the radio button group, then you could do it like this:

// Loop through all of the form fields in the PDF
for i := 1 to QP.FormFieldCount do
begin
   
// Only process radio buttons
   
if QP.GetFormFieldType(i) = 4 then
   
begin
       
// Get radio button group title and selected value
       
WriteLn(IntToStr(i) + '. Group');
       
WriteLn;
       
WriteLn('Radio Button Group: ' + QP.GetFormFieldTitle(i));
       
WriteLn('Selected Radio Button Value: ' + QP.GetFormFieldValue(i));
       
Writeln;
       
end;
       
ReadLn;
       
end;

       
// Get all of the sub-radio buttons from the radio button group
       
WriteLn('Child Radio Buttons In This Group:');
       
WriteLn;
       
if QP.GetFormFieldKidCount(i) <> 0 then
       
for j := 2 to QP.GetFormFieldSubCount(i) do
       
begin
        s
:= QP.GetFormFieldSubTempIndex(i, j);
       
WriteLn(QP.GetFormFieldSubName(i, j));
       
end;
       
Writeln;
   
end;
   
ReadLn;
end;

These examples are written in Delphi and use a console application, however, they should be fairly easy to understand for any programmer and can easily be adjusted to work with a GUI application. If you experience any problems, please leave a comment.

Back to Top
vizacc View Drop Down
Team Player
Team Player


Joined: 01 Mar 07
Status: Offline
Points: 30
Post Options Post Options   Thanks (0) Thanks(0)   Quote vizacc Quote  Post ReplyReply Direct Link To This Post Posted: 11 Jul 11 at 12:31PM
Rowan, thank you :)
Back to Top
vizacc View Drop Down
Team Player
Team Player


Joined: 01 Mar 07
Status: Offline
Points: 30
Post Options Post Options   Thanks (0) Thanks(0)   Quote vizacc Quote  Post ReplyReply Direct Link To This Post Posted: 11 Jul 11 at 12:35PM
do you know how to create a radio button?

Back to Top
vizacc View Drop Down
Team Player
Team Player


Joined: 01 Mar 07
Status: Offline
Points: 30
Post Options Post Options   Thanks (0) Thanks(0)   Quote vizacc Quote  Post ReplyReply Direct Link To This Post Posted: 11 Jul 11 at 12:40PM

Create Radiobuttons - Quick PDF Library Knowledge Exchange

Can you please provide the post for this
Back to Top
vizacc View Drop Down
Team Player
Team Player


Joined: 01 Mar 07
Status: Offline
Points: 30
Post Options Post Options   Thanks (0) Thanks(0)   Quote vizacc Quote  Post ReplyReply Direct Link To This Post Posted: 12 Jul 11 at 3:40AM
a heads up. now the help site is working :) danke danke
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