QuestionQ9

Adaptive Forms creation and configuration

A company plans to give its employees watches following a successful financial year. The company assigns a Forms Developer to design and email a form to its 500 employees to capture their wrist-watch preference.

The available watch choices are: Gold watch, Silver watch, Smart watch.

As a best practice, the AEM Designer uses a Drop-down list control (DropDownList_Watch) to select the watch and two Text field controls (TextField_Current_Selection, TextField_Previous_Selection) to show the current and previously selected watch choices.

What scripting on the change event of DropDownList_Watch correctly displays the current and previous watch selections?

Explanation

In an AEM Forms change event, newText supplies the text after the user action, while the drop-down’s existing rawValue supplies the selection held before that change is committed. Writing those values to the respective text fields displays the newly selected watch and the prior selection.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!