Hello 1T3XT BVBA,
Thanks for the quick reply.
I'm not using fields.getValue (name) because I have no way of knowing the
name of the fields.
The form is made and filled externally.
I have to get the form data to analyze, validate and store it in the
database.
That is why I get the names of the fields in the procedure described in step
4.
I've tried using fields.getValue(name). Below the output I get:
// P1_CB1 -> checkbox 1 page 1
// System.out.println("----test P1_CB1: " + fields.getField("P1_CB1"));
---- test P1_CB1: null
---- test P1_CB1 field type: 0
// CheckBox Group1 -> checkbox group
//System.out.println("----test CheckBox Group1: " +
fields.getField("CheckBox Group1"));
---- test CheckBox Group1: Off
---- test CheckBox Group1 field type: 2
// P1_CB2 -> checkbox 2 Page 1
//System.out.println("----test P1_CB2:" + fields.getField("P1_CB2"));
---- test P1_CB2: null
---- test P1_CB2 field type: 0
// CheckBox Group2 -> checkbox group
// System.out.println("----test CheckBox Group2: " +
fields.getField("CheckBox Group2"));
---- test CheckBox Group2: Off
---- test CheckBox field type: 2
// P1_RB1 -> radio button 1 Page 1
//System.out.println("----test P1_RB1: " + fields.getField("P1_RB1"));
---- test P1_RB1: null
---- test P1_RB1 field type: 0
// P1_RB2 -> radio button 2 page 1
// System.out.println("----test P1_RB2: " + fields.getField("P1_RB2"));
---- test P1_RB2: null
---- test P1_RB2 field type: 0
// Radio Button Group1 -> radio button group
// System.out.println("----test Radio Button Group1: " +
fields.getField("Radio Button Group1"));
---- Test Radio Button Group1: P1_RB1
---- Test Group1 Radio Button field type: 3
--
View this message in context:
http://itext-general.2136553.n4.nabble.com/How-to-manipulate-and-get-the-value-of-checkbox-and-radio-button-groups-tp4656269p4656271.html
Sent from the iText - General mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples:
http://itextpdf.com/themes/keywords.php