Export values and right-to-left radio buttons
- December 21, 2024
- 4 replies
- 3753 views
I have a PDF that is an Arabic translation of an interactive form. There are a large number of yes/no radio buttons with tooltips and "Yes" and "No" export values in the source English form - a few thousand.

So I've written some JS to automate the process of replacing English tooltips with Arabic tooltips. I've already done this without a hitch in a dozen other languages. However, when the form content is laid out right-to-left, as in Arabic, like this:

then my script to replace exportValues with localized Yeses and Nos reverses the order. Note that, when I'm selecting the Arabic Yes and No in the following GIF, that they're in logical order in the JS console, yet still get inserted in the wrong order when I run the code.

How can I get the array in the console to insert values correctly into the radio buttons? Since exportValues are an array, I expected that I might be able to specify exportValue[0] or exportValues[0] but it doesn't seem to work that way.
Is Acrobat just picking up the top leftmost value on the page first?
Is there any way to force Acrobat to respect the logical order of the text in the console?
Is there any way to address the values in the exportValues array one-by-one?
