Hello!
First an apology, i am not a native english speaker, and i do not use an english version, so some terms may vary. I try to look them up, but please bear with me if they are wrong.
I have two (hopefully) simple questions first:
- how can i always round down a value? Say, Textfield A contains the value 5, and i want the rounded down half of that value (2) for Textfield B. How can i get that working?
- can i somehow fill a Textfield with the higher value of two other fields? Say Field A has the Value 4, Field B has the Value 3; i want the form to use the value of Field A then.
I suspect both can only be solved by using java. Sadly i do not know how to use that.
Now my question regarding the combo fields. I just want the selected combo box entry to distribute specific values into other form fields (all text fields). Is this possible, and if yes, how?
EDIT: one more question, is there an easy way to align Text Fields? I know how to copy them, but i still have to maneuver them by hand to the place they are supposed to be. This is tedious, but more importantly this is inaccurate. Is there some way to sort a lot of Text fields that are standing under each other to start at the exact same point?
Thanks in advance!
djax
For your problem you do not want the "round" but the "floor" so you can obtain the closest lower integer.
var result = this.getField("Textfield A").value / 2;
event.value = Math.floor(result);
>- can i somehow fill a Textfield with the higher value of two other fields? Say Field A has the Value 4, Field B has the Value 3; i want the form to use the value of Field A then.One would use the 'max' property to obtain the larger of 2 items.
var A = this.getField("Field A").value;
var B = this.getField("Field B").value;
event.value = Math.max(A, B);
The above code assumes that the Export Value of the combo boxes are numbers.
>is there an easy way to align Text Fields? I know how to copy them, but i still have to maneuver them by hand to the place they are supposed to be. This is tedious, but more importantly this is inaccurate. Is there some way to sort a lot of Text fields that are standing under each other to start at the exact same point?In AcroForms one can set up a grid with the desired intervals and use the "Snap to grid" option.
George Kaiser