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

Hello! Need some help assigning 4 variables to 4 different standard text versions, driven by #1!

New Here ,
Jun 04, 2024 Jun 04, 2024

Copy link to clipboard

Copied

Hello, I have 4 variations of standard text that needs to be generated based on 4 specific selections within my form. 

 

I will need the selection variables to insert in to certain points of the selected text from dropdown #1.

 

Dropdown #1 - will determine which of the 4, standard covenant text templates generates. 

i.e. (DSCR, Consolidated, Ratio, Single) 

 

Dropdown #2 - will determine frequency, (Annual, Quaterly, Monthly) which will be inserted into text.

 

Date #3 - This will need to be inserted into the text. 

 

Dropdown #4 - will determine ratio target, will be inserted into text. 

 

A sample generated text will look like this, 

(This is a test DSCR paragraph, the frequency will be here ____, the date will be here _____, the target will be here ____.) 

 

I went down the route of writing the command for each scenario but this is time consuming and large!

 

Any help is appreciated! 

 

Thank you!

 

TOPICS
How to , JavaScript , PDF forms

Views

94

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 ,
Jun 04, 2024 Jun 04, 2024

Copy link to clipboard

Copied

You can combine the pre-defined text with the values of the fields.

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 ,
Jun 04, 2024 Jun 04, 2024

Copy link to clipboard

Copied

LATEST

You have to concatenate the text string and the values like this:

var dd1=this.getField("Dropdown1").value;
var dd2=this.getField("Dropdown2").value;
var date=this.getField("Date").value;
var dd4=this.getField("Dropdown4").value;
var text=
"This is a test "+dd1+" paragraph, the frequency will be here "+
dd1+",the date will be here "+
date+" the target will be here "+dd4+".";

 

Change the field names to the actual field names.

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