Copy link to clipboard
Copied
Hello everyone ,
I was trying to use javascript for hiding and showing few fields and it works very well , but at the same time i tried to add a syntax to change the text direction but it didn't work !
Any one can help ?
This is my code :
if ( event.target.isBoxChecked(0)) {
this.getField("Date").display = display.visible;
this.getField("Text-1").display = display.visible;
this.getField("Text-2").display = display.visible;
this.getField("Name").display = display.visible;
this.getField("Date-a").display = display.hidden;
this.getField("Text-4").display = display.hidden;
this.getField("Name-a").display = display.hidden;
} else {
this.getField("Date").display = display.hidden;
this.getField("Text-1").display = display.hidden;
this.getField("Text-2").display = display.hidden;
this.getField("Name").display = display.hidden;
this.getField("Date-a").display = display.visible;
this.getField("Text-4").display = display.visible;
this.getField("Name-a").display = display.visible;
this.getField("Text").direction = rtl;
}
Copy link to clipboard
Copied
Text direction (RTL/LTR) can't be set using a script. You can only set the text alignment, as either "center", "right" or "left".
Copy link to clipboard
Copied
Thank you for your reply .
Do you Just through the text box options ? or by using a javascript ?!
Copy link to clipboard
Copied
I don't follow. Do you want to change the alignment of the text in the field? Why not simply do it manually?
Does the alignment need to change?
Copy link to clipboard
Copied
I did it now by adding a second text box with different text direction in the same place and added a function to show each one on a checkbox click ..
i think it is good now ..
One more thing , is it possible to show / hide an image in the same way using a checkbox ?
Copy link to clipboard
Copied
You can do it directly if the image is the icon of a button field, or indirectly if the image is static then you can place a (read-only) field on top of it with a white fill color and show that field when you want to hide the image, and vice versa.
Copy link to clipboard
Copied
I will try and see ..
Thank you so much