• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Help with export value on form field with leading zero

New Here ,
Sep 08, 2022 Sep 08, 2022

Copy link to clipboard

Copied

I posted about this issue a while back and was unable to resolve the problem I am having, so I am trying again and hoping for a different outcome.

 

I am creating a fillable pdf that includes drop-down options for a four-digit name control section on the form. For example, if the last name is Smith the user will enter SMIT in the name control field by choosing each letter separately. Each name control letter will be a separate drop-down field. When the user selects an alpha character from the drop-down list - like "A" - I want the export value to place 01 into another form field. If they choose "B" I want the export value to place a 02 in the other form field and so on until I get to letter J. For some reason, when the export value is a leading zero, it drops the zero off of the form field. Is there something I can do to prevent this from happening? Any guidance would be greatly appreciated.

TOPICS
JavaScript , PDF forms

Views

241

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 09, 2022 Sep 09, 2022

Copy link to clipboard

Copied

The leading zero is removed because the "other form field" uses a Number format, you should use "Format : None" instead.

 

Capture_629.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 09, 2022 Sep 09, 2022

Copy link to clipboard

Copied

I did verify that my text field properties for the other field is set to "none" in the format. So I am guessing it's still something else causing the issue. But thanks for the suggestion!

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 09, 2022 Sep 09, 2022

Copy link to clipboard

Copied

LATEST

Get the value of 'Dropdown' field as string.

For example:

event.value = this.getField("Dropdown").valueAsString;

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines