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

Join fields and capitalize

New Here ,
Apr 29, 2021 Apr 29, 2021

Copy link to clipboard

Copied

I have two fields "name" and "grade".  Name is a standard text entry and grade is a drop down that allows the user to pick one grade.  The name is used in several places in my form.  Some of the places the name is proper case (example:  Tim Smith) and some spots it needs to be upper case (example: TIM SMITH).  I can do the upper and proper case no problem.  What I can't seem to figure out is how I can combine these two fields with the "name" field capitalized and the grade the same as it is in the drop down.  The field "grade" must always be as it is in the list.  The only way I see to do this is the toUpperCase method, which works but changes the grade.  When I do that I get - "TIM SMITH SGT", but I need it to say "TIM SMITH Sgt".  I thought about just placing two fields next to each other but this needs to be in a specific part of the form and with names being different sizes, it won't work.   Can anyone assist with this???

TOPICS
How to , JavaScript , PDF forms

Views

330

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

correct answers 1 Correct answer

Community Expert , Apr 29, 2021 Apr 29, 2021

Set only first field to uppercase:

event.value = this.getField("name").valueAsString.toUpperCase()+" "+this.getField("grade").valueAsString;

Votes

Translate

Translate
Community Expert ,
Apr 29, 2021 Apr 29, 2021

Copy link to clipboard

Copied

Set only first field to uppercase:

event.value = this.getField("name").valueAsString.toUpperCase()+" "+this.getField("grade").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
New Here ,
Apr 29, 2021 Apr 29, 2021

Copy link to clipboard

Copied

LATEST

YES!!!  thank you

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