Just a guess here, but maybe ID applies another font to the check boxes it
creates (the default one is ZapfDingbats), to achieve this custom icon
behavior, and perhaps the JS code resets the field to the default font
setting. You can test it out by executing this code in the JS console
(before changing the value, of course):
If that's the case, then you're probably out of luck, since this property
is read-only in JS, so you can't set it back to the custom font used.
I thought it might be the case, too, but all widgets have the same properties both before and after setting the value with JS. I did this check using all documented properties in Acrobat JS Reference in an attempt to figure out what might be going on.
By the way, I don't think Indesign necessarily uses glyphs for the checked state of widgets, although in this case a glyph is used (albeit with different stroke and fill colours for the glyph, acrobat doesn't allow setting these properties AFAIK). With Indesign CS6 it seems you can practically use any Indesign tool to design the widget's On and Off states. So I'm thinking that maybe Indesign exports these with button-like properties where there are no restrictions on appearance (I think there is an "icon" property/object for buttons or something like that). However Acrobat treats them as checkboxes, so if that is the case it is more of a hack. Is there a way to probe an object's various properties other than using JS or the properties pop-up dialog?
I think you're probably right about that... It seems ID and Acrobat are not
fully compatible on this issue.
You can use an external library or tool to read the properties of the PDF,
such as iText, PDFBox, or something like that.
A long time ago I used to create custom appearances for check boxes by hacking the PDF, but Acrobat stared overriding them with I think Acrobat 6 (or 5) and I gave up. I was encouraged by the new forms-related features of InDesign, but there's still a lot of work to be done, both with InDesign and Acrobat, to make it really useful. This is one of the more glaring incompatibilities. You should report this as a bug with Acrobat, even though it is by design. We just need to try to get them to change the design.