Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

Restricted Numeric Field displaying dates and text ?

Avatar

Level 1

Using ALD ES 8.2, I created a few numeric fields that should only accept numbers. I created a horizontal row of five boxes, for users to enter data (up to  3 digits in any box). The resulting behavior during data entry and editing is strange.

If I enter a number, such as 23 in the first box, and then move to the next field, any number I type immediatly displays a list of choices, sometimes dates, sometimes a drop list of numbers 01-09, etc. The third box doesn't behave this way, but the 4th one does as the 2nd, etc.

If I decide to go back into any field with data and edit the number, a similar drop down list of possible choices pops up, sometimes with dates, or comma separated or decimal, based on the first character I type. I have tried resticting the data pattern to z9, zzz9, 999, z, and while I can see the displayed patterns, the editing problem still exists, making it impossible to edit the field once data is entered, because the drop-down covers the field until a choice is made.

I am sure there is a way to simply keep the entry to no more than three digits, without any drop-down lists appearing upon edits.

I would appreciate any comments or help on this

Tom

4 Replies

Avatar

Former Community Member

Can you send me that form? I am really curious as to what may be causing that. Please send the form to stwalker.adobe@gmail.com.

You could make the field a text field and use a regular expression. The following script assumes the text field is a required field, also.

// form1.page1.subform1.tf::exit - (JavaScript, client)


if (this.isNull) {

  xfa.host.messageBox("The tf is a required field.");

}

else {

  var regExp = /^\d{3}$/;

  var tf = this.rawValue;

  if (!(regExp.test(tf))) {

    xfa.host.messageBox("The tf must be 3 digits.");

  }

}

Steve

Avatar

Level 1

Hi Steve,

Thank you for you reply. I solved it by creating a drop down list box with the numbers 1-99 (for now).  However, because you cannot recreate this or seem to be confused by the issue I am having, it makes me think that when I preview the form as a PDF, the behavior is odd.

If you create two or three numeric fields, place them side-to-side, then preview the PDF, fill in the first field with any number (say 31), then if you try to enter a number in the next field (say 33 or something), check to see if a drop down list of choices appears, each beginning with a 3. Or, if it take sthe number, go back to the first field, hightlight the number and try to type a 2, for example and see if a date (like 22-Jun) appears on a list.

I am wondering if the memory cache of once entered content in other Adobe forms are being automatically displayed for some reason.

This might indicate some preferences I have set in Adobe Acrobat 8 that allow automatic fill-in from pre-entered responses.

Does any of this make sense?

One final request. On my drop down list box of numbers from 1-99, is there a simple code I enter into the XML code that creates a list from 1-999? Right now, the XML code for the field shows 99 separate lines that say <text>1</text>, then <text)2</text>, etc. Just thinking there is a slightly easier way to make the drop down list scrollable to 999.

Thanks,

Tom

Avatar

Former Community Member

Tom,

I would have to see the form to make any sense of the behaviour you are describing.

Sorry. No free lunch on the drop-down list values. I prefer not to use drop-down lists for selection sets larger than 9 items because the user experience is not good. The best you can do for the drop-down items is create the <text> elements in a text editor and copy-and-paste into the raw XML of the drop-down.

Steve

Avatar

Level 1

Hi Steve,

I understand the list box one-at-a-time work fr each item. No problem.

I sent you the form to your e-mail as you requested.

Thanks,

Tom