


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?
Views
Replies
Sign in to like this content
Total Likes
@neohavix Below is a sample form based on the use case that you explained.
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!
If you are referring to Adaptive Forms then you can execute this logic via a simple condition-action rule construct, more information here. Otherwise, in the case of AEM Designer forms you can use the current logic.
Views
Replies
Sign in to like this content
Total Likes
If this is to be a PDF with Designer this is how you can do this:
Place a drop-down like this
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.
@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.
@neohavix Below is a sample form based on the use case that you explained.
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!
Views
Replies
Sign in to like this content
Total Likes
Views
Replies
Sign in to like this content
Total Likes
Views
Replies
Sign in to like this content
Total Likes