Skip to main content
This topic is closed to new replies. Start a new post to keep the conversation going.
try67
try67Correct answer
Community Expert
March 30, 2016

Yes, but then you have to define the field's Format as None.

6 replies

Inspiring
March 30, 2016

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.

Translate
klothosAuthor
Known Participant
March 31, 2016

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

Translate
Inspiring
March 31, 2016

I do not have that problem as long as I delete one or both digits.

Translate
Inspiring
March 30, 2016

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.

Translate
try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
March 30, 2016

Yes, but then you have to define the field's Format as None.

Translate
klothosAuthor
Known Participant
March 31, 2016

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

Translate