Participating Frequently
May 6, 2024
Question
adobe acrobat form texbox value direction
- May 6, 2024
- 2 replies
- 1990 views
I need a script to change the textbox value direction to right to left or left to right as the language in the dropdown list i used the script below and the alignment worked useful but the direction is not working:
// Get the language from a dropdown or text field
var language = this.getField("lang").value;
// Get the text field
var textField = this.getField("Textbox");
// Set the direction based on the language
if (language === "ARABIC") {
textField.alignment = "right";
textField.direction = "rtl"; // right-to-left
} else if (language === "ENGLISH") {
textField.alignment = "left";
textField.direction = "ltr"; // left-to-right
}
