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

Customer fillable field populate data into new field

Explorer ,
Mar 16, 2023 Mar 16, 2023

Copy link to clipboard

Copied

For those that do forms all the time, I'm sure this is super simple. I have a small window to create/design 26 fillable pdf spec sheets, and all need to be able to do the following:

Customer enters an option code in Category 1, then Category 2, the Category 3, and the data popluates into a order # in a field below with a "–" seperating each code. 

I've done this before but it was 8 or 9 years ago and I've barely slept since then I tried to cobble the Java together but it does nothing. Help is seriously appreciated. Sorry if I have the wording wrong, I only do forms once a decade... (if there was book on pdf form creation I'd buy it). 

 

form.jpg

TOPICS
PDF forms

Views

398

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 , Mar 16, 2023 Mar 16, 2023

Try this:

 

var s1 = this.getField("Category1").valueAsString;
var s2 = this.getField("Category2").valueAsString;
var s3 = this.getField("Category3").valueAsString;
if (s1 && s2 && s3)
	event.value = s1+"-"+s2+"-"+s3;
else event.value = "";

Votes

Translate

Translate
Community Expert ,
Mar 16, 2023 Mar 16, 2023

Copy link to clipboard

Copied

Try this:

 

var s1 = this.getField("Category1").valueAsString;
var s2 = this.getField("Category2").valueAsString;
var s3 = this.getField("Category3").valueAsString;
if (s1 && s2 && s3)
	event.value = s1+"-"+s2+"-"+s3;
else event.value = "";

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
Explorer ,
Mar 17, 2023 Mar 17, 2023

Copy link to clipboard

Copied

LATEST

Thanks! Saved my buttocks.

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