precyz wrote:
> In my case this instruction returns only "yes":
> 
> form.getField("nameRadiobutton") is equal to "yes". This says anything to me
> becouse i need something different.

See my previous answer: you misunderstand the concept of radiobuttons
(both in PDF as in HTML).

> Lets take eg. from your book.

Yes, let's do that:
http://1t3xt.info/examples/browse/?page=example&id=247

> There is
> radiobutton named "language".

NO THERE ISN'T!!! Read the example!
"person.language" is a Choice/List/ComboField!
There are radiobuttons "person.preferred"
and there are checkboxes "person.knowledge".

> It has values "languages = { "English",
> "French", "Dutch" };". On document I choose "French" language and then save
> the doc.

A person can have knowledge of different languages (checkboxes),
but we also ask for one preferred language (radiobutton).

> After that i need to read this document again and find out which
> value of radiobutton was choosen. How can i get the choosen value of
> radiobutton?

The way YOU do it, you can't (actually you can, but I don't want
to tell you how because doing it like that would be bad taste).

Let's return to the book example:

For the checkboxes I have 3 fields with different names:
person.knowledge.English
person.knowledge.French
person.knowledge.Dutch
Their values can be "On" or "Off".

For the radio buttons however, there is only one field
"person.preferred" but it has 3 widgets.
EN has "EN" as on-value, and "Off" as off-value
FR has "FR" as on-value, and "Off" as off-value
NL has "NL" as on-value, and "Off" as off-value

You think it should be:
EN has "On" as on-value, and "Off" as off-value
FR has "On" as on-value, and "Off" as off-value
NL has "On" as on-value, and "Off" as off-value
but as you found out, that just doesn't make sense.

Please change the way your form was created so that you
no longer make wrong use of radio buttons.
br,
Bruno


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Do you like iText?
Buy the iText book: http://www.1t3xt.com/docs/book.php
Or leave a tip: https://tipit.to/itexttipjar

Reply via email to