Copy link to clipboard
Copied
is it possible to see the numbers with zero in front like 00 01 02 03 (comb with 2 characters)
Yes, but then you have to define the field's Format as None.
Copy link to clipboard
Copied
Yes, but then you have to define the field's Format as None.
Copy link to clipboard
Copied
i made this
var t1 = Number(this.getField("Textfield221").value);
if (event.value>=1 && event.value<=98 && t1>=1 && t1<=7) this.getField("08").setFocus();var t1 = Number(this.getField("Textfield221").value);
if (event.value=="00" && t2=="0") this.getField("Textfield231").setFocus();
and as you told me i choose format category None
and it works
Thanks
Copy link to clipboard
Copied
Use either a format type of arbitrary mask (e.g., 99) or you could create a custom keystroke/format JavaScript if the arbitrary mask option doesn't behave exactly as you want.
Copy link to clipboard
Copied
Create the form field.
Appearance add border of choice.
Options select "Comb" set size to 2.
Format custom Format Script:
event.value = util.printf("%,102.0f", event.value);
Custom Keystroke script:
if(event.willCommit == false) {
event.rc = isNaN(event.change) == false;
}
Validation:
if(isNaN(event.value) == true) app.alert("Please enter a numeric value", 1, 0);
Close.
Test the field in Preview.
Copy link to clipboard
Copied
hello i follow all your format steps and i run this this custom validation script
if(event.value=="0")this.getField("Textfield221").setFocus();if(event.value>"0")this.getField("Textfield215").setFocus();if(isNaN(event.value) == true) app.alert("Please enter a numeric value", 1, 0);
it works when i type on "0" but then it is strange that i can not clear it.Always 00 apear.
Thanks
Copy link to clipboard
Copied
I do not have that problem as long as I delete one or both digits.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now