Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

FLOATING TEXTS

Avatar

Avatar
Boost 1
Level 1
neohavix
Level 1

Like

1 like

Total Posts

6 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
Validate 1
View profile

Avatar
Boost 1
Level 1
neohavix
Level 1

Like

1 like

Total Posts

6 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
Validate 1
View profile
neohavix
Level 1

20-05-2021

I've created a form using floating texts.  One of the fields is a dropdown list with two options: One (1) or Two (2).  I labeled this as: fltObligate.  The other field is a floating text field.  I labeled as: fltAmount.  What I'm trying to do is this: if I make a selection from the dropdown list, I would like it to return an amount value in fltAmount.  

So, if I choose "One (1)", I would like it to insert an amount of "$10,000".  Similarly, if I choose "Two (2)", the amount would be "$20,000".

I was able to do this in Adobe DC.  However, I wanted to use the floating text feature in AEM.  Here's the code I used for Adobe DC.

var Obligate = this.getField("Obligate").value;
if (Obligate=="One (1) Year") event.value = "$10,000";
else if (Obligate=="Two (2) Years") event.value = "$20,000";
else event.value = ""

Can anyone assist in converting this code to AEM?

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Affirm 25
Employee
PulkitJain
Employee

Likes

59 likes

Total Posts

62 posts

Correct Reply

27 solutions
Top badges earned
Affirm 25
Boost 50
Give Back 10
Establish
Boost 25
View profile

Avatar
Affirm 25
Employee
PulkitJain
Employee

Likes

59 likes

Total Posts

62 posts

Correct Reply

27 solutions
Top badges earned
Affirm 25
Boost 50
Give Back 10
Establish
Boost 25
View profile
PulkitJain
Employee

21-05-2021

@neohavix Below is a sample form based on the use case that you explained.

 

DropdownFloatValue1.PNG

DropdownFloatValue2.PNG

  

When you select a value in the dropdown1 then the value of the dropdown2 changes and the floating field is updated.

if ( this.rawValue == 1)
{ 
this.parent.DropDownList2.selectedIndex = 0;
fltValue1.rawValue="$10000";
}
else 
{ 
this.parent.DropDownList2.selectedIndex = 1;
fltValue1.rawValue="$20000";
}

 

Hope this helps! 

 

Answers (3)

Answers (3)

Avatar

Avatar
Boost 1
Level 1
neohavix
Level 1

Like

1 like

Total Posts

6 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
Validate 1
View profile

Avatar
Boost 1
Level 1
neohavix
Level 1

Like

1 like

Total Posts

6 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
Validate 1
View profile
neohavix
Level 1

20-05-2021

Obligate.PNG

@PulkiJain: this is a screenshot of what I'm trying to accomplish.  I would like the "I Obligate" dropdown list to populate the "For the amount of" dropdown list whenever I chose from the "I Obligate" list.  The choices are: "One (1) year" or "Two (2) years".  If I choose One (1) year, I would like the "For the amount of" list to show $10,000.  Similarly, Two (2) years = $20,000.  At the same time, when I choose from the "I Obligate" list, it will also populate the {fltObligate} based on my choice.  Similarly, I would like the {fltAmount} to be populated when the "For the amount of" list is populated. 

Hope this helps.

Avatar

Avatar
Establish
Employee
Kosta_Prokopiu1
Employee

Likes

144 likes

Total Posts

333 posts

Correct Reply

93 solutions
Top badges earned
Establish
Give Back 5
Give Back 3
Give Back 25
Give Back 10
View profile

Avatar
Establish
Employee
Kosta_Prokopiu1
Employee

Likes

144 likes

Total Posts

333 posts

Correct Reply

93 solutions
Top badges earned
Establish
Give Back 5
Give Back 3
Give Back 25
Give Back 10
View profile
Kosta_Prokopiu1
Employee

20-05-2021

If this is to be a PDF with Designer this is how you can do this:

Place a drop-down like this

Kosta_Prokopiu1_0-1621529400313.png

And a static text object for which you want to change the tool-tip (what Acrobat floating texts are called here).

When you select the drop-down the text is used to change the tool-tip.

Kosta_Prokopiu1_1-1621529542489.pngKosta_Prokopiu1_2-1621529569544.png

 

Avatar

Avatar
Affirm 25
Employee
PulkitJain
Employee

Likes

59 likes

Total Posts

62 posts

Correct Reply

27 solutions
Top badges earned
Affirm 25
Boost 50
Give Back 10
Establish
Boost 25
View profile

Avatar
Affirm 25
Employee
PulkitJain
Employee

Likes

59 likes

Total Posts

62 posts

Correct Reply

27 solutions
Top badges earned
Affirm 25
Boost 50
Give Back 10
Establish
Boost 25
View profile
PulkitJain
Employee

20-05-2021

@neohavix 

If you are referring to Adaptive Forms then you can execute this logic via a simple condition-action rule construct, more information hereOtherwise, in the case of AEM Designer forms you can use the current logic.