Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.

Combo box populating text field

Avatar

Level 1

I would like to be able to populate a text field with multiple entries selected from a combo box e.g. if the combo box has (apple, banna, orange, pear, peach) and a user selects (apple, banna, peach) these values are written to the text field. I would also like a user be able to modify the text field after the selection. How can I go about this?

2 Replies

Avatar

Former Community Member

Is this what you are after?

Untitled.png

// form1.page1.subform1.dd::exit - (JavaScript, client)

if (!(this.isNull)) {

  var str;

  if (form1.page1.subform1.fruitBasket.isNull) {

    str = this.rawValue;

  }

  else {

    str = form1.page1.subform1.fruitBasket.rawValue + " " + this.rawValue;

  }

  form1.page1.subform1.fruitBasket.rawValue = str;

}

Steve

Avatar

Level 1

Hi Steve

Yes that is great. Thank you for your help.

Cheers

Dave