Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Adding a "blank" selection for drop-down menus under list items.

Avatar

Former Community Member

A lot of people on this form are accidentally selecting items that shouldn't be selected and need to be able to change the drop down menu back to blank if they have made a mistake and selected a wrong drop down item in the wrong area.

Please help,

Thanks!

1 Accepted Solution

Avatar

Correct answer by
Level 10

See if this sample helps..To test it, select any value from the Dropdown and click the "Reset" button.

https://acrobat.com/#d=nniRxwkhF*WzNou2QLAm6A

You can not add a blank as an item to Dropdown. So I placed one space using the Space bar while adding items to the Dropdown.

Thanks

Srini

View solution in original post

4 Replies

Avatar

Level 10

Add an item to your Dropdown list with Blank as text and some value to it.

When you want to rest to blank, just simply set the rawValue to the value against the blank text.

For example if I add a blank text and assign a value "1" to it.

Then in the code I may use like below to rest it to Blank Text.

     DropDown1.rawValue ="1";

Thanks

Srini

Avatar

Former Community Member

Gotcha,

But I want thier to be No text, so I don't want the literal text "Blank" to show.

Avatar

Correct answer by
Level 10

See if this sample helps..To test it, select any value from the Dropdown and click the "Reset" button.

https://acrobat.com/#d=nniRxwkhF*WzNou2QLAm6A

You can not add a blank as an item to Dropdown. So I placed one space using the Space bar while adding items to the Dropdown.

Thanks

Srini