PDVariableText text color changes to be the same as the background color after flattening. This effectively makes the text hidden and appear to be lost.
This includes field types such as ListBox and TextField. I don't believe I have tested a combo box.
Notice in the attached fdpAttachment2-example-flattened.pdf, the fields are correctly set but the text is not visible.
If I execute the same code but do not flatten, the text is visible for certain field types in certain pdf viewers. See attached fdpAttachment2-example-not-flattened.pdf
In Adobe Acrobat Reader DC build 15.23.20056.213124 the "Subaward Number" field shows up but only when clicking on the field. When using the Preview app in MacOS Sierra, it is visible. In both apps the "Contact for carryforward" list box shows the text "Administrative Contact"
As a side note I wonder if the behavior of the "Subaward Number" in relation to different pdf views may be related to a difference problem. I think the real issue here is the text color.